1. Java supports which of the following inheritance types?
2. Which of the following keywords is used to differentiate members of superclass and subclass when they have the same name?
3. Which type of inheritance occurs when multiple derived classes inherit from a single base class?
4. Which keyword is used in Java to refer explicitly to a superclass constructor?
5. What relationship does the "HAS-A" relationship represent in Java?
6. Which of the following is NOT a benefit of inheritance in Java?
7. Which of the following is TRUE about Java inheritance?
8. Which of the following is NOT a valid reason for using inheritance in Java?
9. What will happen if you try to declare a class as `public class extends Animal, Mammal{}` in Java?
10. Consider the following code:
11. Which statement about interfaces in Java is CORRECT?
12. Which of the following inheritance types is NOT supported by Java classes?
13. Which statement about method overriding in inheritance is correct?
14. What does the IS-A relationship describe in Java inheritance?
15. How does Java overcome the lack of multiple inheritance of classes?
16. The `instanceof` keyword in Java is used to:
17. Consider the following classes: Animal, Mammal extends Animal, and Dog extends Mammal. What is true about Dog in relation to Animal and Mammal?
18. What is the role of the instanceof operator in Java?
19. Which of the following is TRUE about constructors in Java inheritance?
20. What keyword is used in Java to inherit properties from a superclass?
21. What syntax is correct for a subclass `Main` extending class `One` in Java?
22. In multilevel inheritance, how many total classes are involved minimally?
23. What will happen if a class implements two interfaces with conflicting method names?
24. In the context of Java inheritance, what does the HAS-A relationship signify?
25. In Java, what keyword is used to inherit the properties of a superclass by a subclass?
26. If class `Sub` extends class `Super`, which of the following statements is TRUE?
27. What will happen if a subclass method has the same signature as a superclass method?
28. Which of these is a true statement about an interface in Java?
29. What will be output if a subclass calls `super.display()`?
30. What is the IS-A relationship in Java inheritance?
31. What is the primary reason for using inheritance in Java?
32. Which of the following is a correct use of the `instanceof` operator?
33. In Java, can a class extend and implement another class and interface respectively at the same time?
34. Which inheritance type is shown when one base class has multiple derived classes?
35. What does the term "method overriding" mean in Java?
36. What type of inheritance is demonstrated when a base class is inherited by a class, and that class is further inherited by another class?
37. How can a class in Java achieve multiple inheritance-like behavior if extending multiple classes is not allowed?
38. Which of the following best describes "hybrid inheritance"?
39. The keyword `implements` in Java is used for:
40. Which statement about constructor inheritance is TRUE?
41. Which type of inheritance is shown when one derived class extends two or more base classes?
42. Why is the super keyword used in a subclass constructor?
43. What does the `extends` keyword indicate in Java inheritance?
44. In a single inheritance hierarchy, how many base classes exist for one derived class?
45. What is the output of the code if a subclass and superclass have variables with the same name and the subclass uses `super.variable`?
46. What happens to private members of a superclass in subclass inheritance?
47. What does the super keyword do in the context of Java inheritance?
48. Which keyword is used to implement an interface in Java?
49. Which of the following is illegal in Java?
50. For the following classes: