Inheritance, Polymorphism and Interfaces - ISC Class 12 Computer Science Notes, Diagrams and Solved Questions
Reuse a class by extending it: member access in subclasses, constructors and super, redefining methods and variables, dynamic binding, abstract classes, the class Object and the idea of Java interfaces.
In this chapter
Decide when inheritance (is-a) is the right choice
Use private, protected and public members in subclasses
Chain constructors with super(...)
Override methods and tell overriding from hiding and overloading
Predict which method runs with dynamic binding
Write abstract classes and their subclasses
Redefine toString and equals from class Object
Explain Java interfaces and how they differ from a class's general interface