TOTAL QS = 20Time [ 00 : 00 : 00 ]

Java Inheritance Basics Online Practice Test 1


Total Questions: 20

Total Minutes: 20

This 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 SCORE

0 / 20

Take This Exam
1) What are the features of an Object Oriented Programming (OOPs)?
2) What are the features reused using Inheritance in Java?
3) The class that is being inherited or subclassed is called ___.
4) The class that inherits an already defined class is called ___.
5) Java language supports ___ type of inheritance.
6) You should use Inheritance when there is an IS-A relationship between classes. State TRUE or FALSE.
7) What are the types of Inheritances (Whether Java supports or not) available in Object-Oriented Programming Languages?
8) In a Single inheritance, Class B inherits only from Class A. State TRUE or FALSE.
9) In a Multi Level Inheritance Class-C inherits from Class-B and Class-B inherits from Class-A. State TRUE or FALSE.
10) In a Multi-Level Inheritance in Java, the last subclass inherits methods and properties of ____.
11) When a Class inherits two superclasses (not in Java), it is called ____ inheritance.
12) A Subclass can become a Superclass to another class extending from it in Java. State TRUE or FALSE.
13) You can not inherit a Superclass'es constructor even after using inheritance in Java. State TRUE or FALSE.
14) Find Superclass and Subclass in the below Java code snippet?
class B
  void show(){}
class A
  void hide(){}
15) Find Superclass and Subclass in the below Java program?
class Liquid
  void pour(){}
class Juice extends Liquid
  void filter(){}
16) Which is the keyword used to implement inheritance in Java?
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()
public class JavaInheritance1
  public static void main(String[] args)
    Sugar su = new Sugar();
18) Can you call it a full-fledged inheritance of using ABSTRACT classes and INTERFACES in Java?
19) To control inheritance to different classes and levels, Java provides ____.
20) To stop or block inheriting a given class, the ___ keyword is used before the class.



Show some care. Like or Subscribe.

C MCQ App by ExamTray (Give us 5*)

EXAMTRAY C MCQ android app link

Java MCQ App by ExamTray (Give us 5*)

EXAMTRAY Java MCQ android app link
ALL MCQ App by ExamTray (Give us 5*) EXAMTRAY android app link