What is garbage collection in Java, and how can it be used ?
Answer Posted / sivadasan
Garbage collection is a thread, that runs to reclaim the
memory by destroying objects which object is cannot be
referenced anymore.
Deleting Dynamically created objects from the memory.
Finalize method used to achieve garbage collection.
By using Runtime.gc() or System.gc() the object will be
garbage collected.
Is This Answer Correct ? | 30 Yes | 14 No |
Post New Answer View All Answers
What is polymorphism java example?
Write a program in java to find the maximum and minimum value node from a circular linked list.
Explain where variables are created in memory?
Difference between java and javascript
In Java list the methods that can be overridden?
What is ascii format?
What are 3 boolean operators?
What's the base class in java from which all classes are derived?
What is the difference between applet and application?
Why we use protected in java?
what is server side caching?
Will set allow duplicates in java?
What does void * mean?
What does math floor () do?
How many characters is 16 bytes?