inverse « Boolean « Java Data Type Q&A

1. What's the most concise way to get the inverse of a Java boolean value?

If you have a boolean variable:

boolean myBool = true;
I could get the inverse of this with an if/else clause:
if (myBool == true)
 myBool = false;
 myBool = true;
Is there a more ...

2. Inverse Boolean Value

3. Find Inverse Boolean Value