Questions and Answers
What are the advantages of Inheritance?
Code reusability and method overriding
What is the Super keyword used for in Java?
To access the parent class’s variables, methods, and constructors
What is the difference between single inheritance and hierarchical inheritance?
Single inheritance allows a subclass to have only one superclass, while hierarchical inheritance allows a superclass to have multiple subclasses