LearnFrenzy
Sign in Take a free test

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

Modifiers for a permitted subclass Answer, explanation & discussion

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

Which modifiers may a permitted subclass of a sealed class use?

  • A public, private or protected
  • B final, sealed or non-sealed Correct
  • C static or abstract only
  • D None
Correct Answer: Option B

Records and enums are implicitly final, so they need none.

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