boolean isAuthenticated = false; boolean hasPermission = true; if (isAuthenticated && hasPermission) { System.out.println("Access granted."); } else { System.out.println("Access denied."); }