Inheritance is a good way to share functionality between objects. When a class has a parent class, we say it inherits the fields and methods of its parent.
8. Inheritance
Get Modern Programming Made Easy: Using Java, Scala, Groovy, and JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.