Assume that the following enumerated data type has been declared: Enum Letters { Z, Y, X }

Question:

Assume that the following enumerated data type has been declared: 

Enum Letters { Z, Y, X }

What will the following code display? 

If (Letters.Z.compareTo(Letters.X) > 0)
 System.out.println("Z is greater than X.");
Else
 System.out.println("Z is not greater than X."); 

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: