What is garbage collection in Java, and how can it be used ?
Answer Posted / syed sikandar bakht
when an object in memory is no longer refered by a variable,
the garbage collector automatically move it to garbage
collection.
instead of calling destructor JVM do it automatically, as we
use destructor in c++ to destroy the object.
| Is This Answer Correct ? | 20 Yes | 6 No |
Post New Answer View All Answers
Can you sort a list in java?
Explain the difference between hashmap and hashtable in java?
What is an interoperable application in java ?
How many ways can an argument be passed to a subroutine and explain them?
What are some examples of variable costs?
What is lexicographically smallest string?
Write a program in java to find the maximum and minimum value node from a circular linked list.
What is difference between jdk,jre and jvm?
Which is faster call by value or call by reference?
How many types of array are there?
What is lambda expression in java?
How do you trim a space in java?
What about main thread in java?
What happens when heap memory is full?
Which is better singleton or static class?