Java Language Specification, Version Java SE 13 Edition
4.2.5. The boolean Type and boolean Values5 Documented Misconceptions
ComparisonWithBooleanLiteral
To test whether an expression is true or false, one must compare it to true or to falseMapToBooleanWithConditionalOperator
To map a boolean expression to a boolean, a conditional operator is necessaryMapToBooleanWithIf
To map a boolean expression to a boolean, an if statement is necessaryNumericToBooleanCoercion
Numeric types can be coerced to booleanReferenceToBooleanCoercion
Every reference type can be coerced to boolean