& non-short-circuit AND | non-short-circuit OR public class MainClass{ public static void main(String[] argv){ int z = 5; if(++z > 5 || ++z > 6) z++; // z = 7 after this code System.out.println(z); //versus: z = 5; if(++z > 5 | ++z > 6) z++; // z = 8 after this code System.out.println(z); } }
7 8