I have one execute method in try block.if this method thorows any exception catch block will handle that exception.I called execute method in Test classs in try bock. my problem Test catch block handle the exception java.lang.OutOfMemoryError: Java heap space
I am getting lang.OutOfMemoryError: Java heap space
The cause might be an infinitely recursing function, or a unending loop with an evergrowing list. This can be trivial: intending in
paint to call
super.paint but forgetting "super.".
OutOfMemoryError is not the result of a programming error, and your program really need this amount of memory then you could try and increase the heap space given to the application. See: