DEV Community

Discussion on: Do you code `if (foo == true) ` in Java?

Collapse
 
vishnuharidas profile image
Vishnu Haridas • Edited

If you are afraid of if(foo==true) becomes this:

if (foo = true)

then you can always use

if( true == foo)

without any fear.

Collapse
 
bobbypriambodo profile image
Bobby Priambodo

"Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering."

en.wikipedia.org/wiki/Yoda_conditions

:p