Java Programming - Inheritance
Java Programming - Inheritance
inheritance in
accordance with
Java framework
Inheritance in Java
Inheritance can be defined as the
process where one class acquires the
properties (methods and fields) of
another. With the use of inheritance
the information is made manageable
in a hierarchical order.
Copying
PROPERTIES
Inheritance in Java
The class which inherits the properties
of other is known as subclass (derived
class, child class) and the class whose
properties are inherited is known as
superclass (base class, parent class).
Copying
PROPERTIES
extends Keyword
extends is a function
that allows you to inherit
the properties of a class.
extends Keyword
Following is the syntax of
extends keyword.
class Super {
.....
.....
}
class Sub extends Super {
.....
.....
}
Following is an example
demonstrating Java
inheritance. In this example,
you can observe two classes
namely Calculation and
My_Calculation.