1.

Which exception is thrown when java is out of memory?(a) MemoryFullException(b) MemoryOutOfBoundsException(c) OutOfMemoryError(d) MemoryErrorThe question was asked by my college director while I was bunking the class.My question is taken from Heap and Garbage Collection topic in section Classes and Methods of Java

Answer»

Right option is (C) OutOfMemoryError

To explain: The Xms FLAG has no default VALUE, and Xmx TYPICALLY has a default value of 256MB. A COMMON use for these flags is when you encounter a java.lang.OutOfMemoryError.



Discussion

No Comment Found

Related InterviewSolutions