Look at the output of this code:
int x = 0; boolean b = false & (++x == 1); // b is false System.out.println(x); // prints 1 x = 0; b = false && (++x == 1); // b is false System.out.println(x); // prints 0
This is different in that & will always evaluate both operands, while && will not look at the second operand if the first is false , because the whole expression will always be false regardless of what the second operand is.
source share