Posts

Showing posts with the label types of inheritance in java

Inheritance in Java with example

Image
Inheritance is a concept in java where new classes can be produced from existing classes. The newly created class acquires all the features of existing class from where it is derived.                     Inheritance can be implemented in java using two keywords:           1.    extends              2. implements           Producing new class from existing classes is called inheritance.              •       The newly produced class is called sub class. The original class is called super class.              •       Extends is the keyword use in inheritance. Syntax: 1 class SubClass extends SuperClass         ...