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


When is an object in the mean to garbage collection?

Answers were Sorted based on User's Feedback



When is an object in the mean to garbage collection?..

Answer / chandrarekha

whenever the object goes out of scope or when it is no
longer being referenced, in such cases it can be a garbage
object. Garbage collection is implicitly invoked whenever
resources have to be allocated to the new objects that are
created and approach to detect a garbage object can be done
through reference-counting collectors,tracing
collectors,compacting collectors. The garbage collectors
can also be explicitly invoked by gc() supported by JVM
which is in the java.lang package

Is This Answer Correct ?    1 Yes 1 No

When is an object in the mean to garbage collection?..

Answer / ravikiran

when it is not reffered by any active thread

Is This Answer Correct ?    0 Yes 0 No

When is an object in the mean to garbage collection?..

Answer / sathya

When the object is no longer referenced, its eligible for
Garbage Collection

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Core Java Interview Questions

What is the difference between Byte stream and Charecter Stream?

2 Answers   Tarang Software,


what is difference betwenn Access Specifier and Access Modifier ????

2 Answers  


please send code example of inner classes?

2 Answers  


Can Applet have constructors?

5 Answers   Infosys,


To obtain design information about an object, which class in used?

1 Answers  


What is a container in a gui?

0 Answers  


what is generics in jdk1.5?

2 Answers   Bally Technologies,


What do you understand by abstract classes?

0 Answers   HCL,


What is the definition of tree ?

0 Answers   Amazon,


what happens when a thread cannot acquire a lock on an object? : Java thread

0 Answers  


Is string thread safe in java?

0 Answers  


Why we go for collections in java?

0 Answers  


Categories