Skip to content
Sharp

Modern Java · interview question

What keyword is used to define an enum in Java?

Multiple choiceEasychapter-7-curatedpremiummodern-javaenums
Choose one answer
Answer and explanation

Correct answer

C. Enum

Why

The keyword 'enum' is used to define an enumeration in Java. It is a special data type that enables a variable to be a set of predefined constants.

Test yourself on Modern Java

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

Start free test
All Modern Java questions →