Karu, please be sure that you realise that "=!" is not a Java operator, whereas "!=" is a single Java operator. Instead of using "=!" it is better to put spaces between the "=" and the "!". That is, like this: boolean b = !true; in which case the boolean variable b gets the value false.