LearnFrenzy
Sign in Take a free test

Records, Enums and Sealed Classes · Records, Enums and Sealed Classes MCQ · Question 2

Access level of an enum constructor Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 2 Back to Exercise

What is the access level of an enum constructor?

  • A public
  • B private (implicitly) – enums cannot be instantiated with new Correct
  • C protected
  • D package-private and callable from anywhere in the package
Correct Answer: Option B

Declaring it public or protected is a compile error.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links