MediumConceptCore Java and OOP
How do records, sealed classes and enums differ from ordinary classes?
This answer is part of Pro
12 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.
PreviousWhat is the contract between equals() and hashCode()?Next What is the difference between composition and inheritance, and which do you prefer?