What is an abstract class, and how does it differ from an interface in Java?
Inheritance and Polymorphism
Original Khojo Papers practice question — not from a past board paper.
Multiple inheritance of classes creates the diamond problem: if two superclasses define the same member, the compiler cannot tell which the subclass should inherit. Java avoids the ambiguity by allowing only single inheritance of classes, and provides interfaces so that a class can still take on several types.
No citable source has been recorded for this record. Treat it as practice material, not as fact.
A class may implement any number of interfaces.
From the same topic and chapter, at a similar level.
What is an abstract class, and how does it differ from an interface in Java?
Inheritance and Polymorphism
A class B extends class A, and both define a method show(). If A a = new B(); a.show(); is executed, which version runs and why?
Inheritance and Polymorphism
What does the super keyword do in Java?
Inheritance and Polymorphism
Distinguish between method overloading and method overriding.
Inheritance and Polymorphism
What is dynamic method dispatch, and why is it useful?
Inheritance and Polymorphism
State and verify the absorption law X + X·Y = X using a truth table.
Boolean Algebra