What is the output from the following code
enum Level { LOW, MEDIUM, HIGH, URGENT; } enum Color { RED, GREEN, BLUE; } public class Main { public static void main(String[] args) { Level s1 = Level.LOW; Level s2 = Level.URGENT; Color c = Color.BLUE; System.out.println(s1 == s1); System.out.println(s1 == s2); System.out.println(s1 == c); } }
// A compile-time error. System.out.println(s1 == c);
Cannot compare Level and Color enum types using == operator.