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

Answer Posted / veer

When an object has of no use in a program then it has to be
discarded to free the occupied space by it so that other
object can fill the space.That is what Garbaghe collection
is.

Is This Answer Correct ?    42 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the importance of finally block in java?

566


What is difference between call by value and call by reference?

498


How will you communicate between two applets?

627


How many types of memory areas are allocated by jvm?

558


What is a double vs float?

534






Is null a string?

550


What are the loops in java?

520


How many functional interfaces does java 8 have?

604


What is the purpose of garbage collection in java?

651


What are the approaches that you will follow for making a program very efficient?

640


What is the base class of all exception classes?

581


What are white spaces in java?

525


What is your platform’s default character encoding?

553


What does s mean in regex?

549


How do you remove an element from an arraylist in java?

460