L3.2: Logical Expressions: Logical operators - Or ||

PHOTO EMBED

Mon Oct 02 2023 02:07:06 GMT+0000 (Coordinated Universal Time)

Saved by @TestProSupport

public class Main {

    public static void main(String[] args) {
        boolean hasAccessCard = true; 
        boolean hasSecurityClearance = false; 

        boolean canEnterRestrictedArea = hasAccessCard || hasSecurityClearance;

        System.out.println("Can the user enter the restricted area? " + canEnterRestrictedArea);
    }
}
content_copyCOPY