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 ? | 180 Yes | 34 No |
Post New Answer View All Answers
Can we overload run() method in java?
What is protected in java?
What are conditionals and its types?
What is the integer of 16?
Is an array a vector?
What is difference between next () and nextline () in java?
What state does a thread enter when it terminates its processing in java programming?
Is a case study a method or methodology?
What is e in java?
Is there any sort function in java?
How can constructor chaining be done using this keyword?
What differences exist between iterator and listiterator?
How we can declare a static variable?
Can we have two main methods in a java class?
Can constructor be synchronized?