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 |
What is the exact difference in between Unicast and Multicast object?
What does java ide mean?
How to access a variable if it is declared as private?
Explain features of interfaces in java?
What is passing by reference in java?
When do you get classcastexception?
what is the difference between applet and swing and gui application in java . What we do with the collections set and list interface
2 Answers CTS, Phoenix Technologies,
Can we override the static method?
What is the purpose of the main method?
Explain the difference between arraylist and linkedlist in java?
Can we override constructors in java?
What is a numeric format?