'Or operator inside sub condition in java [duplicate]

Can we use logical or operator inside sub condition in Java

if (b.equals("good" || "it was good"))
    System.out.println("Thank goodness");


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source