Which operator is used by Java run time implementations to free the memory of an object when it is no longer needed?
A. delete
B. free
C. new
D. None of the mentioned
Answer:D
Which operator is used by Java run time implementations to free the memory of an object when it is no longer needed?
A. delete B. free C. new D. None of the mentioned
Explanation: Java handles deallocation of memory automatically, we do not need to explicitly delete an element. Garbage collection only occurs during execution of the program. When no references to the object exist, that object is assumed to be no longer needed, and the memory occupied by the object can be reclaimed.