How is Garbage collection done in Java?
Answer Posted / boomiraj
Programmer can not cause the garbage collector.
We can call the garbage collection using System.gc();
And we can set the variable value equal to null, it assign that variable garbage rest the that use.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is file in java?
What is bom encoding?
Can we have a method name same as class name in java?
What data type is true or false?
What is java beans?
Is string an object?
How big is a pointer?
What is difference between == equals () and compareto () method?
Explain the access modifiers for a class, method and variables?
What is the difference between scrollbar and scrollpane?
how is final different from finally and finalize in java?
Do I need to import java.lang package any time? Why?
What is the static field modifier?
What does arrays sort do in java?
What is an object in java?