Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / sivadasan

Garbage collection is a thread, that runs to reclaim the
memory by destroying objects which object is cannot be
referenced anymore.

Deleting Dynamically created objects from the memory.

Finalize method used to achieve garbage collection.

By using Runtime.gc() or System.gc() the object will be
garbage collected.

Is This Answer Correct ?    30 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain restrictions for using anonymous inner classes?

1098


How do I print a “?

1003


What is difference between final and finally in java?

1096


How do listeners work?

1055


Can we create an object of static class in java?

1022


What are the data types supported by java? What is autoboxing and unboxing?

1025


How you can force the garbage collection?

990


How we can generate random numbers in java?

1136


Which command from the jdk compiles a java program?

1002


Explain the difference between comparator and comparable in java?

965


Define iterator and methods in iterator?

974


What is output buffer?

1058


What are data types in oop?

1040


What is threaded programming and when is it used? : Java thread

1072


What is the benefit of lambda expressions?

1068