L3.2: Logical Expressions: Logical operators - not !

PHOTO EMBED

Tue Oct 17 2023 08:12:17 GMT+0000 (Coordinated Universal Time)

Saved by @testpro #java

public class Main {
    public static void main(String[] args) {
      
        boolean enrolledInAutomationClass = true; 
        boolean notEnrolledInAutomationClass = !enrolledInAutomationClass;

        System.out.println("Is the student enrolled in the automation class? " + notEnrolledInAutomationClass);
    }
}
// Output: Is the student enrolled in the automation class? false
content_copyCOPY