InstructionsTotal Questions: 20Total Minutes: 20This ExamTray Free Online Test or Quiz or Trivia tests your Programming Skills on the basics of Java Abstract Class. This 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 Abstract Class 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) An abstract class in Java can be created using the keyword ____. A) final B) interface C) abstract D) static 2) To create an Abstract class, the keyword "class" is also required. State TRUE or FALSE. A) TRUE B) FALSE C) - D) - 3) Can you create an object from an abstract class in Java? A) Yes B) No C) - D) - 4) Which is the opposite of an Abstract Class? A) Interface B) concrete class C) - D) - 5) Choose a correct implementation of an Abstract class in the below Java code? A) abstract class ClassA { } B) abstract class ClassB { abstract void method(); } C) abstract class ClassC { void method() { System.out.print("Hello Abstract Class"); } } D) All the above 6) An abstract class in Java usually contains one or more abstract ____. A) constructors B) methods C) variables D) None 7) Does the below Java code with abstract method compile? class Puppy { abstract void showName(); } A) NO B) YES C) - D) - Ad 8) What is the output of the below Java program with an abstract class? abstract class Coffee { Coffee() { System.out.println("Inside Constructor of Coffee.."); } } class ColdCoffee extends Coffee { ColdCoffee() { System.out.println("Inside Constructor of ColdCoffee.."); } } public class AbstractClassTesting { public static void main(String[] args) { ColdCoffee cf = new ColdCoffee(); } } A) Compiler error B) Inside Constructor of Coffee.. Inside Constructor of ColdCoffee.. C) Inside Constructor of ColdCoffee.. D) Inside Constructor of Coffee.. 9) What is the output of the below Java program with an abstract class? final abstract class Bell { } class DoorBell extends Bell { DoorBell() { System.out.println("DoorBell ringing.."); } } public class AbstractClassTesting2 { public static void main(String[] args) { Bell bell = new DoorBell(); } } A) DoorBell ringing.. B) No output C) Compiler error D) None of the above 10) What is the output of the below Java program with an abstract class? abstract class MathLibrary { static final float PI = 3.1415f; } public class AbstractClassTesting3 { public static void main(String[] args) { System.out.println(MathLibrary.PI); } } A) No output B) Compiler error C) 3.1415 D) None of the above 11) What is the output of the below Java program with multiple abstract classes? abstract class Editor { abstract void show(); } abstract class Author extends Editor { abstract void print(); } class Office extends Author { void show() { System.out.println("Editor method"); } void print() { System.out.println("Author method"); } } public class AbstractClassTesting4 { public static void main(String[] args) { Editor ed = new Office(); ed.show(); Author au = new Office(); au.print(); } } A) Editor method Editor method B) Author method Author method C) Editor method Author method D) Compiler error 12) An object of multi-level inherited abstract class can not be created in memory? State TRUE or FALSE. A) TRUE B) FALSE C) - D) - 13) An abstract class with 100% abstract methods is equivalent to ______. A) Concrete class B) Virtual Class C) Interface D) All the above 14) What is the output of the below Java program with an abstract class? public abstract class AbstractClassTest5 { public static void main(String[] args) { System.out.println("Inside Main() method.."); } } A) No output B) Compiler error C) Inside Main() method.. D) None of the above Ad 15) What is the output of the below Java code with an abstract class and inner class? public abstract class AbstractClassTest6 { class Anonymous { int a=5; } public static void main(String args[]) { System.out.print("Inner class is present.."); } } A) Compiler error B) Inner class is present.. C) No output D) None of the above 16) Choose a correct statement about abstract classes? A) An abstract class can extend a concrete class B) An abstract class can extend another abstract class C) An abstract class can implement any number of interfaces. D) All the above. 17) Choose correct statements about an Abstract class in Java? A) An abstract class implementing an Interface, need not implement methods of an interface B) An abstract class extending another abstract class, need not define methods of the super abstract class. C) The first subclass of an abstract class should define all the abstract methods inherited from all the interfaces and super abstract classes. D) All the above 18) Just like an Interface, you can define constants in abstract classes in Java. State TRUE or FALSE. A) TRUE B) FALSE C) - D) - 19) Abstract classes support ____ inheritance. A) Multiple B) Multilevel C) - D) - 20) An abstract class can define ____ inside of it. A) Inner abstract class B) Inner concrete class C) static methods D) All 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 Method Overriding Online Test NEXT Java Interface Online Test