Inheritance
(4)
Extending
(2)
public abstract **class** ElephantSeal **extends** Seal {
// Methods and Variables defined here
}Class Modifiers
(4)
Java Object Inheritance
(2)
The key is that when Java sees you define a class that doesn’t extend another class, it immediately adds the syntax extends java.lang.Object to the class defnition.
If you define a new class that extends an existing class, Java doesn’t add this syntax, although the new class still inherits from java.lang.Object. Since all classes inherit from java.lang.Object, extending an existing class means the child automatically inherits from java.lang.Object by construction.
Constructor Rule
(5)
Calling Inherited Class Members
(4)
Overriding a Method
(5)
Hiding Methods
(5)
Creating final methods
(1)
Hiding Variables
(4)
Abstract Class Definition Rules (5)
Concrete Classes
(2)
Abstract Method Definition Rules
(4)
Object vs. Reference
(2)
Casting Objects
(4)
Virtual Methods
(1)
A virtual method is a method in which the specific implementation is not determined until runtime. In fact, all non-final, non-static, and non-private Java methods are considered virtual methods, since any of them can be overridden at runtime. What makes a virtual method special in Java is that if you call a method on an object that overrides a method, you get the overridden method, even if the call to the method is on a parent reference or within the parent class.
Defining an Interface
(6)
Inheriting an Interface
(2)
Classes, Interfaces, and Keywords
(2)
Abstract Methods and Multiple Inheritance
Interface Variables
Default Interface Methods
(5)
Static Interface Methods
(2)