In Java, there is a concept of Inheritance which is implemented through a super class and subclass definition and achieved through the object creation process, programmatically.
Sub-class in java
In Java, there is a concept of Inheritance which is implemented through a
super class and subclass definition and achieved
through the object creation process, programmatically.
-- Through inheritance developers organize and structure the software program in an hierarchical
manner through the concept of super class and subclass.
allows a new
class known as the sub-class to inherit some existing behavior and states of
the super classes. This highly promotes the concept of code reusability and
saves a lot of time.
-- Sub class never allows a user to start coding from very scratch but to
start from already existing classes and employ code reusability.
-- Already existing class allows the subclass to inherit all of its properties
and Now the programmer just requires to add the new
-- Sub classes saves time and work.
-- Sub classes allows to
reduce the development time, introduce a
better data analysis, less efforts to code and ultimately better
Sub classes allows to achieve the run time polymorphism in java.