D

Dhruva Jagannath • 660 Points
Invincible

Q. Enums are best used when:

  • (A) Values may change dynamically
  • (B) You need a fixed set of constants
  • (C) You require user input
  • (D) You are building a REST API
  • Correct Answer - Option(B)
  • Views: 17
  • Filed under category Java
  • Hashtags: Java Enums

Explanation by: Dhruva Jagannath
Enums are ideal for defining a fixed set of related constants.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.