LearnFrenzy
Sign in Take a free test

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

Can a record be extended? Answer, explanation & discussion

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

Which is true of records?

  • A They can extend other classes
  • B They are implicitly final and extend java.lang.Record, but may implement interfaces Correct
  • C They can be abstract
  • D They can declare instance fields
Correct Answer: Option B

Static fields, methods and nested types are allowed.

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