Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


Does garbage collection guarantee that a program will not
run out of memory?



Does garbage collection guarantee that a program will not run out of memory?..

Answer / ranganathkini

Garbage Collection of Java is an automatic mechanism that
safeguards against memory leaks and handles memory
allocation and de-allocation.

The GC makes all possible attempts to free memory and make
it available for fresh allocations. But at certain times it
cannot. At those times, it throws an OutOfMemoryError.

So to conclude, GC handles most of the memory management and
makes all possible attempts to make memory availabe for the
application but it does not gurantee that it will be able to
provide it.

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More Core Java Interview Questions

What are the basic interfaces of java collections framework?

0 Answers  


Can we extend singleton class in java?

0 Answers  


Explain tree set and its features?

0 Answers  


Which sorting is used in arrays sort in java?

0 Answers  


Interface A { String test(); } Interface B { int test(); } Create a class AB which must implements both A & B interfaces.

17 Answers   Hewitt,






Name few java util classes introduced with java 8 ?

0 Answers  


how to convert mm/dd/yy to dd/mm/yy using collections in java.

4 Answers   Bosch,


Can the garbage collection be forced by any means?

0 Answers  


what do you mean by classloader in java?

0 Answers  


What is the difference between logical data independence and physical data independence?

0 Answers  


What is pass by value?

0 Answers  


Same common question what is Map,Set,HashMap,List????

4 Answers   Symphony,






Categories