Inheritance in Java with example
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 ...