Programming - Classes and Objects
You Are Here :: Home > JAVA > Classes and Objects - General Questions
19. |
____________constructor is useful to initialize all objects with same data.
|
A. |
Parameterized |
B.
|
Default |
C.
|
both
|
D.
|
none
|
|
Answer: Option B
Explanation:
Default constructor is useful to initialize all objects with same data. |
|
20. |
____________constructor is useful to initialize each objects with different data.
|
A. |
Parameterized |
B.
|
Default |
C.
|
both
|
D.
|
none
|
|
Answer: Option A
Explanation:
Parameterized constructor is useful to initialize each objects with different data. |
|
21. |
Is Parametrized constructor have any parameters?
|
A. |
Yes |
B.
|
No |
C.
|
may be
|
D.
|
cant say
|
|
Answer: Option A
Explanation:
Yes,Parametrized constructor have parameters |
|
22. |
Is Default constructor have any parameters?
|
A. |
Yes |
B.
|
No |
C.
|
may be
|
D.
|
cant say
|
|
Answer: Option B
Explanation:
No,Default constructor have no parameters |
|
23. |
A_______________ is used to initilize the instance variables of a class.
|
A. |
Constructor |
B.
|
Destructor |
C.
|
Methods
|
D.
|
Variables
|
|
Answer: Option A
Explanation:
A Constructor is used to initilize the instance variables of a class. |
|
24. |
A_______________is used for any general purpose processing as calculations.
|
A. |
Method |
B.
|
Class |
C.
|
object
|
D.
|
Instances
|
|
Answer: Option A
Explanation:
A Method is used for any general purpose processing as calculations. |
|
« prev
next »