Skip to content
Sharp

Modern Java · interview question

In what situation might it be inappropriate to use an enum in Java?

Multiple choiceHardchapter-7-curatedpremiummodern-javamodern-java-design-choices
Choose one answer
Answer and explanation

Correct answer

C. When the set of constants is expected to change frequently

Why

Enums are best suited for a fixed set of constants. If the constants need to change frequently, it can be cumbersome to modify the enum each time.

Test yourself on Modern Java

A free test with instant, explained results. No account needed.

Start free test
All Modern Java questions →