A

Admin • 37.39K Points
Coach

Q. What is the order of the variables in Enum?

  • (A) Descending order
  • (B) Ascending order
  • (C) Random order
  • (D) Depends on sort() method
  • Correct Answer - Option(B)
  • Views: 191
  • Filed under category JAVA

Explanation by: Admin
The compareTo() method is implemented in Enum. java.lang.Enum.compareTo() sort variables in ascending order.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics