Cleanest way to toggle a boolean variable in Java?

theBoolean = !theBoolean;

Leave a Comment