What is garbage collection in Java, and how can it be used ?
Answer Posted / janet
When an object is no longer referred to by any
variable,java automatically reclaims memory used by that
object.This is known as garbage collection.
System.gc() method may be used to call it explicitly.
| Is This Answer Correct ? | 182 Yes | 34 No |
Post New Answer View All Answers
What is a nested class?
What is the parse method in java?
What is meant by data hiding in java?
what methods would you overwrite in java.lang.object class?
How to call one constructor from the other constructor ?
Why is singleton instance static?
What is core java used for?
What is a list in java?
What are methods?
How to perform quicksort in java?
Can set contain duplicates?
Explain the pointers in Java?
Describe the Big-O Notation.
Why parameters should be passed by reference?
What is the current version of java?