A

Admin • 828.03K 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: 13
  • Filed under category Java
  • Hashtags:

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.

Be the first to start discuss.