| 11. |
Which of the following is a method having same name as that of its class?
|
||||||||
|
Answer:
Option (d) |
| 12. |
Which operator is used by Java run time implementations to free the memory of an object when it is no longer needed?
|
||||||||
|
Answer:
Option (d) |
| 13. |
Which function is used to perform some action when the object is to be destroyed?
|
||||||||
|
Answer:
Option (a) |
| 14. |
Which of the following statements are incorrect?
|
||||||||
|
Answer:
Option (c) |
| 15. |
What is true about private constructor?
|
||||||||
|
Answer:
Option (a) |
| 16. |
What is true about constructor?
|
||||||||
|
Answer:
Option (b) |
| 17. |
Abstract class cannot have a constructor.
|
||||
|
Answer:
Option (b) |
| 18. |
What is true about protected constructor?
|
||||||||
|
Answer:
Option (b) |
| 19. |
What would be the behaviour if one parameterized constructor is explicitly defined?
|
||||||||
|
Answer:
Option (d) |
| 20. |
What would be behaviour if the constructor has a return type?
|
||||||||
|
Answer:
Option (a) |