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 |
Is vector synchronized in java?
what is for datainputstream?
If there are two notepad opened and working on it . is this a process or thread? computer based Live Example to differentiate between Thread , Process , and Multi tasking ?
What are parsers? Dom vs sax parser.
Diff between Comparator and Comparable?
What is mvc in java?
Why is an interface be able to extend more than one interface but a class can’t extend more than one class?
Explain inner classes ?
What is the destroy method?
how can u create the object with out new operator
Is hashset ordered java?
difference between arraylist and linkedlist otherthan performance