Q: What are the features of an Object Oriented Programming (OOPs)?
Solution: -
Q: What are the features reused using Inheritance in Java?
Solution: Variables and Methods are reused through inheritance. Constants are nothing but variables only if they hold some value.
Q: The class that is being inherited or subclassed is called ___.
Solution: Superclass or Super-Class
Q: The class that inherits an already defined class is called ___.
Solution: Subclass
Q: Java language supports ___ type of inheritance.
Solution: Multi-Level Inheritance is somewhat complicated.
Q: You should use Inheritance when there is an IS-A relationship between classes. State TRUE or FALSE.
Solution: Yes. One simple example is ANIMAL Superclass and HORSE Subclass. HORSE is-a/is-an ANIMAL.
Q: What are the types of Inheritances (Whether Java supports or not) available in Object-Oriented Programming Languages?
Solution: Java supports extending from only one Superclass. Multilevel inheritance is completely supported by Java. Whereas Multiple and Hybrid inheritances are based on Multiple-Superlclasses scenario and hence not supported by Java.
Q: In a Single inheritance, Class B inherits only from Class A. State TRUE or FALSE.
Solution: True.
Q: In a Multi Level Inheritance Class-C inherits from Class-B and Class-B inherits from Class-A. State TRUE or FALSE.
Solution: -
Q: In a Multi-Level Inheritance in Java, the last subclass inherits methods and properties of ____.
Solution: Yes. The last class inherits all of the properties and methods of all of the classes above it in the chain.
You Have Score    | /10 |