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 object data type?
What is Unicast and Multicast object? Where we will use?
1 Answers Scope International,
What is the replace tool?
What is ternary operator?
what is the significance of listiterator in java?
Explain about the security aspect of java?
What are different exception types exceptions available in java ?
why the abstract class has default constructor?
Why do we declare a class static?
what is business delegate?
What is final keyword in java?
Does java have extension methods?