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 a line separator in java?
What does the string method compareto () do?
What are memory tables?
State some situations where exceptions may arise in java?
What is wrapper class html?
What are three ways in which a thread can enter the waiting state in java programming?
Can we sort array in java?
What are static blocks in java ?
How to create an immutable class?
How to call one constructor from the other constructor ?
What is r in java?
What is difference between float and double?
When can we say that threads are not lightweight process in java?
What is the purpose of sizeof operator?
Why is string builder not thread safe?