Java 101: Inheritance in Java, Part 2: Object and its methods

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.

To read this article in full, please click here

分類: IT 資訊科技 趣聞, IT 資訊科技(信息技术), java教學網站, 科技趣聞,標籤: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 。這篇內容的永久連結