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 increment in java?
As a developer what steps do you take to improve the performance?
What is ph and buffers?
What is the difference between final, finally and finalize()?
Explain garbage collection in java?
is it possible to add a object in a HASHMAP
why not override thread to make a runnable? : Java thread
How can we make copy of a java object?
How many types of JVM's (OR) Name of the JVM's which are used in Tomcat & Weblogic servers ?
WHAT IS JDK,JVM,CLASS DEFINE ALL?
What are the benefits of java?
what is the output??????? public class multireturn { public(int assign x ( int x) { if(4==x) { return 7; } else if (7=x+3) { return 6; } return 5; } }