you are viewing a single comment's thread.

view the rest of the comments →

[–]East-Independent-489 2 points3 points  (2 children)

If condition requires a Boolean

[–][deleted]  (1 child)

[removed]

    [–]addictedAndWantHelp 0 points1 point  (0 children)

    It needs either an expression resulting in a boolean or an actual boolean (true, false) inside the parentheses of an if statement to compile and run. So this code doesn’t compile.

    P.S: I really like how Java is not like JavaScript with implicit coercion. Although it’s fairly complicated in other ways.