What is garbage collection in Java, and how can it be used ?

Answer Posted / ashish

Garbage collection is the Process of automatically freeing
objects that are no longer referenced by the Program.
But a Potential disadvantages of a garbage-collected heap is
that it adds an overhead that can affect program performance....

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does it matter in what order catch statements for filenotfoundexception and ioexception are written?

512


Differentiate between run time error and syntax error.

575


Can we declare array without size in java?

555


What are the advantages of encapsulation in java?

556


I want to re-reach and use an object once it has been garbage collected. How it's possible?

558






Is there a case when finally will not execute?

569


What is passing value java?

514


Give a practical example of singleton class usage?

594


What is arguments in java?

525


What are the advantages of packages in java?

576


How can we break singleton in java?

528


Can we write a class without main method in java?

487


What is meant by distributed application? Why are we using that in our application?

555


How to do encapsulation in java?

575


Explain parallel processing in java8?

637