java change boolean to opposite

Java
theBoolean = !theBoolean;
Source

Also in Java: