As I was reading a colleague\'s Java code, I stumbled upon an army of if/else statements. In these statements, several && and || operators wer
&&
||
Because of the precedence of && on ||, (true || true && false) this will be evaluated as (true || (true && false)) -> (true || (false)) -> true
(true || true && false)
(true || (true && false)) -> (true || (false)) -> true
See the precedences rules: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html