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)
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.");
Step by Step Solution
3.41 Rating (157 Votes )
There are 3 Steps involved in it
Solution The following code will display Z is not ... View full answer
Get step-by-step solutions from verified subject matter experts
