This Program illustrates the operators precedence, here the & oprator takes precedence over the | oprator.
so in the first if we can describe the expression as follows ((b1 & b2) | (b2 & b3) | b2) ((true & false) | (false & true) | false) ( (false) | (false) | false) and as u can see it produces fals so the condition will not execute
in the second condition ((b1 & b2) | (b2 & b3) | b2 | b1) ((true & false) | (false & true) | false | true) ( (false) | (false) | false | true) and as u can see it will evaluate to true so the condition will execute
and the program will print "do kwy" to the console
Please click on the My Profile link above and change your display name to match the JavaRanch Naming Policy of using your real first and real last names