A

Admin • 828.43K Points
Coach

Q. Which method returns all constants of an enum type?

  • (A) enumValues()
  • (B) getEnumConstants()
  • (C) values()
  • (D) constants()
  • Correct Answer - Option(C)
  • Views: 25
  • Filed under category Java
  • Hashtags: Java Enums

Explanation by: Admin
The `values()` method returns an array of all constants defined in the enum.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.