Programming - Classes and Objects
You Are Here :: Home > JAVA > Classes and Objects - General Questions
13. |
To declare constants we use the keyword_________.
|
A. |
final |
B.
|
this |
C.
|
super
|
D.
|
constant
|
|
Answer: Option A
Explanation:
To declare constants we use the keyword "Final". |
|
14. |
Is constructor name and class name will be same?
|
A. |
Yes |
B.
|
No |
C.
|
may be
|
D.
|
cant say
|
|
Answer: Option A
Explanation:
Yes, constructor name and class name will be same. |
|
15. |
Is constructor return any value?
|
A. |
yes |
B.
|
No |
C.
|
may be
|
D.
|
cant say
|
|
Answer: Option B
Explanation:
No,constructor never return any value. |
|
16. |
May constructor have parameters?
|
A. |
yes |
B.
|
No |
C.
|
may be
|
D.
|
May have (or) may not
|
|
Answer: Option C
Explanation:
May be constructor have parameters. |
|
17. |
A constructor is called ________________________when the object creation is going on
|
A. |
Parallerly |
B.
|
Concurrently |
C.
|
Horizontally
|
D.
|
default
|
|
Answer: Option B
Explanation:
A constructor is called Concurrently when the object creation is going on |
|
18. |
___________constuctor,which accepts data from outside and initializes the instance variables with that data.
|
A. |
Parameterized |
B.
|
Un parameterized |
C.
|
both
|
D.
|
none
|
|
Answer: Option A
Explanation:
Parameterized constuctor,which accepts data from outside and initializes the instance variables with that data. |
|
« prev
next »