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 exactly garbage collection take place?

Answers were Sorted based on User's Feedback



how exactly garbage collection take place? ..

Answer / niraj talukdar

Garbage Collection is an automated process in Java unlike C
and C++. It executes to wipe out those objects which no
longer are used in a program or stay idle for a very long
time. This to free memory space alloted to these
objects.However, it is not guaranteed that all the idle
objects wil be destroyed every time garbage collection
process gets executed.A user can also manually call the
garbage collection to take place by executing System.gc()
method.

Is This Answer Correct ?    3 Yes 0 No

how exactly garbage collection take place? ..

Answer / vijayakumar chinnasamy

Variable/object
1. is eligible for garbage collection when no object refers
to it.
2. Is eligible when its reference is set to null i.e
objName=null.
3. referred by method variables or local variables are
eligible for garbage collection when they go out of scope.

Is This Answer Correct ?    1 Yes 0 No

how exactly garbage collection take place? ..

Answer / vinay

Another way to call garbage collector :-
Runtime rt = Runtime.getRuntime();
rt.gc();

Is This Answer Correct ?    0 Yes 0 No

how exactly garbage collection take place? ..

Answer / devil

As in Java its happen automatically, but if you want to do
this force fully you can do this by the use of
keyword "finalize".

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More Core Java Interview Questions

What is the structure of java?

0 Answers  


Is java call by reference?

0 Answers  


What is an Exception ?

10 Answers  


what is the use of clone method? why user cant overwrite in sub class without its proper defination.

2 Answers   TCS,


What is difference between iterator and enumeration in java?

0 Answers  


Name component subclasses that support painting in java programming?

0 Answers  


What is synchronization? How it can be achieved?

2 Answers  


Which class represents the socket that both the client and server use to communicate with each other?

0 Answers  


What does it mean to be immutable?

0 Answers  


Difference between java and javascript

0 Answers  


take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).

0 Answers  


Which class is the superclass of all classes?

0 Answers  


Categories