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
What one should take care of, while serializing the object?
What are the advantages of defining packages in java?
What is casting in java programming?
What are the 3 types of control structures?
How to obtain a performance profile of java program
What is merge sort in java?
What is the use of singleton class?
Is array serializable java?
What is command line argument in java?
What is variable in java?
Can an interface implement another interface?
What is Classloader in Java?
Can you call a method on a null object?
What is busy spin, and why should you use it?
How do you convert bytes to character in java?