Day31: Inheritance, Super()
Inheritance Inheritance is one of the core principles of Object Oriented Programming. As the name indicates to inherit means to acquire features of existing entity in a newly created entity. Just like a child inherits the features of his/her parents. Similarly, if while designing a class in Java, a programmer wants then he can use the features(instance variable and Methods) of an existing class into his own class. But to do this the programmer will have to apply the concept of INHERITANCE. In java, the class will gets inherited is called as SUPER CLASS and the class which inherits is called as SUB CLASS. Thus via inheritance member of super class can also be accessed through the object of sub class. Benefits of Inheritance The major benefit of applying inheritance is code reusability. This is because the sub class programmer is not required to redesign those methods or java again which already have been provided by the super class. This saves lor of time and effort on the part of sub