Pages Navigation Menu

Coding is much easier than you think

Catching out of memory error in java

 
Catching out of memory error in java
 
Catching out of memory error in java
 
You can catch it as it descends from Throwable:
 

try {
    // create lots of objects here and stash them somewhere
} catch (OutOfMemoryError E) {
    // release some (all) of the above objects
}

 

About Mohaideen Jamil


Am currently working as a Struts 2 Developer in a reputed IT Organisations. I can help you with teaching Core java and Struts 2. Follow me on Facebook or Google Plus. If you like my tutorials, consider making a donation to this charity, thanks.

  • Saranya

    Thanks for sharing.