Question: JAVA PLEASE EXPLAIN 19. Assume the following enumerated data type has been declared what is the output: enum Letter{ Z,Y,X} What will the following code
JAVA PLEASE EXPLAIN
19. Assume the following enumerated data type has been declared what is the output:
enum Letter{ 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
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
