May 31 in JAVA
Q: Is it correct to say that due to garbage collection feature in Java, a java program never goes out of memory in Java?

1 Answer

May 31
Even though automatic garbage collection is provided by Java, it doesn’t ensure that a Java program will not go out of memory as there is a possibility that creation of Java objects is being done at a faster pace compared to garbage collection resulting in filling of all the available memory resources.

So, garbage collection helps in reducing the chances of a program going out of memory but it doesn’t ensure that.
Click here to read more about JAVA
Click here to read more about Insurance

Related questions

Jan 24 in JAVA
Mar 17 in C Sharp (C#)
Jan 10 in JAVA