All About Class OutOfMemoryError in Java

OutOfMemoryError is thrown from an application when the java virtual machine can not create an object and can not allocate space for the object as it is out of memory and no more memory could be made available by the garbage collector at that time of the execution.
The structure of the class OutOfMemoryError is given by:


public class java.lang.OutOfMemoryError extends java.lang.VirtualMachineError{
//constructor
public OutOfMemoryError();
//constructs an empty OutOfMemoryError object that is an object with no message specified.
public OutOfMemoryError(String message);
//constructs an OutOfMemoryError object with the message specified.

}
 
All About Class OutOfMemoryError in Java All About Class OutOfMemoryError in Java Reviewed by Animesh Chatterjee on September 20, 2018 Rating: 5

No comments:

Powered by Blogger.