int i = 0;
boolean b = true;
System.out.println(b && !(i++ > 0))
When I compile the above code, I return true.
But how can this be, since the second part of the argument (since b is already true) basically translates into
(0 + 1 > 0) => (1 > 0)
which should return true. Then the statement will be true && falsethat false.
What am I missing?
source
share