What is Inheritance?

Inheritance is one of the features of Object Oriented Programming.

This feature allows emulating real world inheritance behavior. This is one of the best features to avoid reuse of the code and increase redundancy.

In the Java language, classes can be derived from other classes, thereby inheriting fields and methods from those classes.

“A class that is derived from another class is called a subclass (also a derived class, extended class, or child class). The class from which the subclass is derived is called a super class (also a base class or a parent class).”

Except Object, which has no superclass, every class has one and only one direct superclass (single inheritance). In the absence of any other explicit superclass, every class is implicitly a subclass of Object.

The idea of inheritance is simple yet powerful:

Let us take a Scenario:

When you want to create a new class and there is already a class that includes some of the code that you want (which is functionally same), you can derive your new class from the existing class. By doing this, you can reuse the fields
and methods of the existing class without having to write (and debug!) them yourself.

Here I have introduced you to one of the important feature used in Java.

For detailed explanation with example you can refer:

If you are interested in learning Java online with a real time expert and choose your profession as a Java developer, please register with us.

For more details about the course content, Visit :
Java Online Training Course

Java Online Training

Java, an object oriented programming language is opted by many professionals and enterprises as a leading programming language. Java is every where;  it is used by Google, Amazon, EBay, Linkedin etc… This clearly indicates that most of the programming is done in Java itself.

Also many of the companies are opting for employees who have the knowledge of Java. This is the reason that there is a demand for the
professionals working in the Java domain.

Pro IT Online Training is providing you the opportunity to build a career in such a platform where the career growth is huge. We also offer advanced Java courses for the professionals who are looking to upgrade their knowledge and try out for better career prospects.

Pro IT Online Training gives you the option to attend the online classes at your flexible time slot and learn from a real time professional. Course content can be restructured according to your requirements.

Visit us for further details:
Visit our Java course webpage : Java Online Training