Java - What is the output: enum value and == operator

Question

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);

  }
}


Click to view the answer

// A compile-time error. 
System.out.println(s1 == c);

Note

Cannot compare Level and Color enum types using == operator.