HI ALL,
How to Overcome "OutOfMemoryException"? when I am compiling
source having more than 1000 LOC throwing this exception.
Can any one give correct answer to my question? thx

Answer Posted / sunit panday

actually there are some conditions due to which
OutOfMemoryException caused as follows:-
1. when java virtual machine coudnot create the object as
specified by the programmer
2. when the database so high as respect to system physical
and virtual memory is low
you can use following command to find the free memory:-
Runtime runtime = Runtime.getRuntime();
System.out.println ("Free memory : " - + runtime.freeMemory
() );
as this exception is in java.lang.Object package

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about DSN?

717


How to check jdbc connection in java?

667


code to insert values/rows into oracle database from a java swing textfield when a button is pressed(using preparedstatements)

4088


What is JDBC Driver interface?

756


How many types of resultset are there in jdbc?

697


How do I stop nullpointerexception?

677


What is the purpose of the jdbc resultset interface?

680


What is a lock in jdbc?

709


If you are truncated using JDBC, how can you that how much data is truncated?

771


What are the different types of statements in jdbc?

661


What are the flow statements of jdbc?

722


What are the ddl statements?

633


Is it possible to connect to multiple databases? Using single statement can we update or extract data from two or three or many databases?

782


What is the difference between jdbc and jndi?

680


What is benefit of using preparedstatement in java?

669