InstructionsTotal Questions: 20Total Minutes: 20This ExamTray Free Online Test or Quiz or Trivia tests your Programming Skills on the basics of Java Inheritance. This practise-test displays answers after finishing the exam for review. You can easily clear Competitive Exams and Job Interview Questions. Students can learn Java basics. Go through Java Theory Notes on Inheritance before attempting this test. All the Best Challenge SCORE0 / 20Take This Exam 1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19*20*Q Buttons 1) What are the features of an Object Oriented Programming (OOPs)? A) Inheritance B) Encapsulation C) Polymorphism D) All the above 2) What are the features reused using Inheritance in Java? A) Methods B) Variables C) Constants D) All the above 3) The class that is being inherited or subclassed is called ___. A) Subclass B) Superclass C) - D) - 4) The class that inherits an already defined class is called ___. A) Subclass B) Superclass C) - D) - 5) Java language supports ___ type of inheritance. A) Multiple Inheritance B) Multi-Level Inheritance C) - D) - 6) You should use Inheritance when there is an IS-A relationship between classes. State TRUE or FALSE. A) TRUE B) FALSE C) - D) - 7) What are the types of Inheritances (Whether Java supports or not) available in Object-Oriented Programming Languages? A) Single Inheritance B) Multi-Level Inheritance, Hierarchical Inheritance C) Multiple Inheritance, Hybrid Inheritance D) All the above Ad 8) In a Single inheritance, Class B inherits only from Class A. State TRUE or FALSE. A) TRUE B) FALSE C) - D) - 9) In a Multi Level Inheritance Class-C inherits from Class-B and Class-B inherits from Class-A. State TRUE or FALSE. A) TRUE B) FALSE C) - D) - 10) In a Multi-Level Inheritance in Java, the last subclass inherits methods and properties of ____. A) Only one immediate Superclass B) Few classes above it. C) All classes above it D) None 11) When a Class inherits two superclasses (not in Java), it is called ____ inheritance. A) Multilevel inheritance B) Single Inheritance C) Multiple Inheritance D) None 12) A Subclass can become a Superclass to another class extending from it in Java. State TRUE or FALSE. A) TRUE B) FALSE C) - D) - 13) You can not inherit a Superclass'es constructor even after using inheritance in Java. State TRUE or FALSE. A) TRUE B) FALSE C) - D) - 14) Find Superclass and Subclass in the below Java code snippet? class B { void show(){} } class A { void hide(){} } A) B is superclass and A is subclass. B) A is superclass and B is a subclass. C) There is no superclass or subclass present. D) None Ad 15) Find Superclass and Subclass in the below Java program? class Liquid { void pour(){} } class Juice extends Liquid { void filter(){} } A) The Liquid is a superclass and Juice is a subclass. B) The Liquid is a Subclass and Juice is a Superclass. C) There is no superclass or subclass D) None 16) Which is the keyword used to implement inheritance in Java? A) extends B) implements C) instanceof D) None 17) What is the output of the below Java program with inheritance? class Sweet { void price() { System.out.print("Sweet=$10 "); } } class Sugar extends Sweet { void price() { super.price(); System.out.print("Sugar=$20"); } } public class JavaInheritance1 { public static void main(String[] args) { Sugar su = new Sugar(); su.price(); } } A) Sweet=$10 Sugar=$20 B) Sweet=$10 Sugar=$10 C) Sweet=$20 Sugar=$20 D) Compiler error 18) Can you call it a full-fledged inheritance of using ABSTRACT classes and INTERFACES in Java? A) NO B) YES C) - D) - 19) To control inheritance to different classes and levels, Java provides ____. A) Return types like the void, int, float, double and other object types B) Static keyword C) Access modifiers like default, public, protected, private D) None 20) To stop or block inheriting a given class, the ___ keyword is used before the class. A) static B) private C) final D) none of the above FINISH EXAM 1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19*20*PREV Java Varargs Online Test NEXT Java Inheritance Online Test 2