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 communist flag?
what are three ways in which a thread can enter the waiting state? Or what are different ways in which a thread can enter the waiting state? : Java thread
What is the primitive type short?
How do you implement polymorphism in our day to day life?
What are the advantages of java?
Why is java architectural neutral?
If an application has multiple classes in it, is it okay to have a main method in more than one class?
How do you declare a variable?
Why we used vector class?
What is the list interface in java programming?
Is string serializable in java?
What is finally block?
When should we create our own custom exception classes?
java program with complete 4 oops concepts implemented example
Can we sort list in java?