June 2018
Beginner
722 pages
18h 47m
English
Let's define each of the logical operators first:
Here is the demo code:
boolean x = false;System.out.println(!x); //prints: trueSystem.out.println(!!x); //prints: falseboolean y = !x;System.out.println(y & x); //prints: falseSystem.out.println(y | x); //prints: trueboolean z = true;System.out.println(y & z); //prints: trueSystem.out.println(y | z); //prints: true
Notice that the ! operator can be applied to the same value several times.
Read now
Unlock full access