Is there a better way to negate a boolean in Java than a simple if-else?

if (theBoolean) {
    theBoolean = false;
} else {
    theBoolean = true;
}

9 Answers
9

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *