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; ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access