I've started to learn java not to long ago, and recently I've come across this problem.
int i = 0;
boolean b = true;
if(b || (i++ == 1))
System.out.println(i); //i is 0
System.out.println(i); // i is still 0
if(((i++) == 0) || ((i++) == 0))
System.out.println(i); // i is now 1
System.out.println(i); // i is 1
How come after the first if i is still zero but not after the second?