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


Please Help Members By Posting Answers For Below Questions

Can we synchronize static methods in java?

598


How to create a base64 decoder in java8?

554


What all access modifiers are allowed for top class ?

710


How are observer and observable used in java programming?

541


What is a treeset in java?

542






What do you understand by final value?

584


What restrictions are placed on method overriding?

637


What is a numeric string?

559


Can you make a constructor final in Java?

624


What is arguments in java?

519


Explain importance of inheritance in java?

604


write a program that list all permutations of ABCDEF in which A appears before B?

2009


What is the use of protected in java?

532


Which is the class in java?

514


Explain the advantages of packages in java?

513