Java provides a standard class library consisting of thousands of classes and other reference types. Despite the disparity in their capabilities, these types form one massive inheritance hierarchy by directly or indirectly extending the Object
class. This is also true for any classes and other reference types that you create.
The first half of this tutorial on Java inheritance showed you the basics of inheritance, specifically how to use Java’s extends
and super
keywords to derive a child class from a parent class, invoke parent class constructors and methods, override methods, and more. Now, we’ll turn our focus to the mothership of the Java class inheritance hierarchy, java.lang.Object
.
Find A Teacher Form:
https://docs.google.com/forms/d/1vREBnX5n262umf4wU5U2pyTwvk9O-JrAgblA-wH9GFQ/viewform?edit_requested=true#responses
Email:
public1989two@gmail.com
www.itsec.hk
www.itsec.vip
www.itseceu.uk