Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| ||||
Core Java - Interview Questions and Answers for 'Destructors' - 4 question(s) found - Order By Newest | ||||
| ||||
Ans. Constructors are used for initializing the object state once it is initialized and memory has been reserved for it. Destructor is used to de-allocate memory allocated by objects. There are no destructors in Java. Alternatively, Java provides Automatic garbage collection i.e automatically releasing the un-referenced memory. | ||||
![]() | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
![]() | ||||
| ||||
Ans. Destructor is used to de-allocate memory allocated by objects. There are no destructors in Java. Alternatively, Java provides Automatic garbage collection i.e automatically releasing the un-referenced memory. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
![]() | ||||
| ||||
Ans. Java manages memory using built-in garbage collector | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Yes , a gc method to explicitly call garbage collection immediately on the object. It will provide better flexibility over application that require optimal usage of memory. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() | ||||