Lesson 20Diving into Inheritance
In this part of our lesson, we will look at specialization and inheritance. In Lesson 17, we discussed how inheritance can be used to model an is-a relationship between objects. These relationships are hierarchical in nature and express a true inheritance, or parent-child, relationship between objects. In this lesson, we will cover extension of classes, method overloading, method overriding, access control, and how polymorphism works with inheritance.
As mentioned earlier in this lesson, you won't explicitly use inheritance often in the rest of this course or in web application development, but you will implicitly use inheritance all the time. Inheritance is a foundational concept of object-oriented programming, and you must have a good understanding of this concept to be a successful object-oriented developer.
EVERYTHING EXTENDS OBJECT
The Object
class is the parent of every class in Java; ...
Get Job Ready Java 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.