6.9. Review notes
Inheritance with classes:
- A class can inherit the properties and behavior of another class.
- A class can implement multiple interfaces.
- An interface can inherit zero or more interfaces. An interface can’t inherit a class.
- Inheritance enables you to use existing code.
- Inheriting a class is also known as subclassing.
- A class that inherits another class is called a derived class or subclass.
- A class that’s inherited is called a parent or base class or superclass.
- Private members of a base class can’t be inherited in the derived class.
- A derived class can only inherit members with the default access modifier if both the base class and the derived class are in the same package.
- A class uses the keyword extends to inherit a class. ...
Get OCA Java SE 8 Programmer I Certification Guide 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.