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 a thread?
What is t type java?
How many decimal digits is 64 bit?
How do you remove duplicates from an array in java?
Can we declare main () method as non static?
What is application tier?
Hi Friends, can u give me Real Time example for interface and abstract class.(With Banking Example)
Why java is made?
Name the package that always imported by default?
Can we have a try block without catch block?
Can you declare the main method as final?
What technique can be employed to compare two strings?