MediumConceptCore Java and OOP
What is the difference between composition and inheritance, and which do you prefer?
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.
PreviousHow do records, sealed classes and enums differ from ordinary classes?Next What is the try-with-resources statement?