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...

How is Garbage collection done in Java?

Answer Posted / harish

Garbage Collection is carried out based on the reference
type an object is currently in.
There are 4 types of references in java
1)strong reference
2)soft reference
3)weak reference
4)phantom reference

the last one is the weakest of the weak.
JVM will try get all those of object that are fell in this
category and try to collect it.
But it is not neccessary the object in phantom reference
phase will always be garbage collected.

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is comparable and comparator interface? List their differences

1147


What are the drawbacks of singleton class?

1062


When would you use a static class?

1024


What is java command?

1126


What are design patterns and please explain?

1132


When should the method invokelater() be used?

1067


What is byte code and why is it important to java’s use for internet programming?

1195


What is nested loop? What is dangling else condition in it?

1134


Is static a keyword in java?

1025


What do you understand by Header linked List?

1157


What is class forname used for?

1101


What is string args [] in java?

1067


What is the internal implementation of set in java?

986


Is null false in java?

1228


what are the methods in object?

1203