Java - Object-Oriented Programming (OOPS) Concept - Inheritance Quiz
# | Quiz |
---|---|
1
Discuss
|
Inheritance
Which of this keyword must be used to inherit a class?
Solution |
2
Discuss
|
Inheritance
What will be the output of the following Java program?
Solution |
3
Discuss
|
Inheritance
What will be the output of the following Java program?
Solution |
4
Discuss
|
Inheritance
What will be the output of the following Java program?
Solution |
5
Discuss
|
Inheritance
Which of these is correct way of inheriting class A by class B?
Solution |
6
Discuss
|
Inheritance
A class member declared protected becomes a member of subclass of which type?
Solution |
7
Discuss
|
Inheritance
What is not type of inheritance?
Solution |
8
Discuss
|
Inheritance
Does Java support multiple level inheritance?
Solution |
9
Discuss
|
Inheritance
What would be the result if a class extends two interfaces and both have a method with same name and signature? Lets assume that the class is not implementing that method.
Solution |
10
Discuss
|
Inheritance
Which of the following is used in implementing inheritance through class?
Solution |
11
Discuss
|
Inheritance
Which of the following is used for implementing inheritance through an interface?
Solution |
12
Discuss
|
Inheritance
Static members are not inherited to subclass.
Solution |
13
Discuss
|
Inheritance
If super class and subclass have same variable name, which keyword should be used to use super class?
Solution |
14
Discuss
|
Inheritance
In order to restrict a variable of a class from inheriting to subclass, how variable should be declared?
Solution |
15
Discuss
|
Inheritance
All classes in Java are inherited from which class?
Solution |
16
Discuss
|
Inheritance
Using which of the following, multiple inheritance in Java can be implemented?
Solution |
# | Quiz |