Programming - Classes and Objects
You Are Here :: Home > JAVA > Classes and Objects - General Questions
25. |
Writing more constructors with the same name between with diffe
|
A. |
Constructor overloading |
B.
|
Constructor overriding |
C.
|
method overloading
|
D.
|
metho overriding
|
|
Answer: Option A
Explanation:
Writing more constructors with the same name between with diffe |
|
26. |
A___________contains instance variables and methods.
|
A. |
Class |
B.
|
object |
C.
|
both
|
D.
|
functions
|
|
Answer: Option A
Explanation:
A Class contains instance variables and methods. |
|
27. |
A____________is called only once per object?
|
A. |
Constructor |
B.
|
Destructor |
C.
|
Methods
|
D.
|
Variables
|
|
Answer: Option A
Explanation:
A Constructor is called only once per object. |
|
28. |
A_____________can be called several times on the object.
|
A. |
Constructor |
B.
|
Destructor |
C.
|
Methods
|
D.
|
Variables
|
|
Answer: Option C
Explanation:
A Methods can be called several times on the object. |
|
29. |
Is constructor executed automatically?
|
A. |
Yes |
B.
|
No |
C.
|
may be
|
D.
|
cant say
|
|
Answer: Option A
Explanation:
Yes,A constructor executed automatically. |
|
30. |
Can you declare a class as "public"?
|
A. |
Yes |
B.
|
No |
C.
|
cant say
|
D.
|
may be
|
|
Answer: Option A
Explanation:
Yes, you can declare a class as "public". |
|
« prev
next »