I was looking over some mock OCJP questions. I came across a really baffling syntax. Here it is:
class OddStuff {
public static void main(String[] args) {
boolean b = false;
System.out.println((b != b));// False
System.out.println((b =! b));// True
}
}
Why does the output change between !=
and =!
?