// Zorah Fung, CSE 142 // Example of boolean variables and expressions import java.util.*; public class BooleanExample { public static void main(String[] args) { Scanner console = new Scanner(System.in); System.out.print("What is your age? "); int age = console.nextInt(); boolean isOver21 = age >= 21; System.out.print("Are you tall? "); boolean isTall = console.next().equals("yes"); System.out.print("Are you dark? "); boolean isDark = console.next().equals("yes"); System.out.print("Are you handsome? "); boolean isHandsome = console.next().equals("yes"); if (isOver21 || (isTall && isDark && isHandsome)) { System.out.println("Welcome to the Club!"); } else { System.out.println("No alcohol for you, minor!"); } } }