Constructors, Classes, and Inheritance
Description: Constructors, Classes, and Inheritance | |
Number of Questions: 15 | |
Created by: Aliensbrain Bot | |
Tags: Constructors Classes and Inheritance Java/Oracle /C/C++ Basics of Java Inheritance and Constructor |
The protected access specifier works as ________ for outside world, but works as ________ for derived classes in Java.
If the first statement of a constructor has the form ________, then the constructor calls another constructor of the same class.
The protected access specifier is very useful in ___________ inheritance.
Which of the following classes is not a wrapper class?
Final modifier can be applied to
All the data members in an interface are
Select a valid answer with respect to the following piece of code.
class A
{
int value1;
}
class B extends A
{
int value2;
}
Which of the following statements is/are correct in Java? A. Constructors do not have any return type. B. Constructors cannot be private.
If there are more than one constructors in a class, then it is termed as ____________.
What is the minimum number of parameters in a constructor of Java?
Which type of inheritance is represented by the following code? class A { } class B extends A { }
Which type of inheritance is represented by the following code? class A { } class B extends A { } class C extends B { }
Multiple inheritance can be implemented in Java using __________.
A __________ class cannot be extended.
Which of the following is the implementation of the class structure given below?