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 the difference between state-based unit testing and interaction-based unit testing?
What is static import in java?
What is the difference between final, finally and finalize()?
What is the difference between serial and throughput garbage collector?
Can an interface extend a class?
What is the function of static in java?
What is passed by reference and pass by value ?
What is the maximum size of array in java?
What are exceptions
What is parsing in java?
If system.exit (0); is written at the end of the try block, will the finally block still execute?
What is lastindexof in java?
When do we use synchronized blocks and advantages of using synchronized blocks?
How to Sort Strings which are given in List and display in ascending order without using java api.
Is namespace same as package in java?