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 are the three best choices for a development environment?
Explain an intermediate language?
Explain different types of wrapper classes in java?
What is a java lambda expression?
In java, how many ways you can take input from the console?
What is java reflection api?
What is java’s garbage collected heap?
What modifiers may be used with a top-level class?
What is the purpose of void class?
What invokes a thread's run() method in java programming?
What is the difference between serial and throughput garbage collector?
What is the difference between char and char *?
Can a class be declared as protected?
Is sizeof a preprocessor?
What is the difference between inner class and nested class?