Maximum Array Size in an Applet.

S

Sanny

In my Java Applet I want to have Big Arrays to store a few data.

All are 3 Dimensional Array with Maximum Size as shown Below.

1. int[][][] tripleintegerarray = new int[100][200][200];

What will be the Size of this "tripleintegerarray" Array in Java
Applet will all Browsers support Such large Array?

2. String[][][] tripleStringarray = new String[100][200][200];

What will be the Size of this "tripleStringarray" Array in Java Applet
will all Browsers support Such large Array?

1. long[][][] tripleintegerarray = new long[100][200][200];

What will be the Size of this Array in Java Applet will all Browsers
support Such large Array?

My arrays are Sparse Arrays meaning Most of them will be Blank. So
will I save Space If I use.

int[][][] tripleintegerarray = new int[][][];


Without specifying the Array Size. In this case how much Memory will
be used. And Will it cause ArrayoutofBounds If I give
tripleintegerarray[55][67][99]=88;

In this case will the Array Size Automatically increased to [66][68]
[100]?

Bye
Sanny
 
R

Roedy Green

new int[100][200][200];

There are 100x200x200 elements in total or 4,000,000 = 16MB.
In addition there are 100 slots of references in the primary index and
20,000 slots of references in the secondary indices or 80KB.

Whether you can hold that depends on what else you are doing and the
size of the memory space specified on the command line. See
http://mindprod.com/jgloss/javaexe.html

But you asked about Applets. I have never heard anyone explain how
the size of the virtual region for the JVM in an Applet is determined
and if there is any way to change it. I suspect it is chosen by the
browser maker in a secret ceremony involving small mammals.

See http://mindprod.com/jgloss/pod.html
 
G

Gordon Beaton

I have never heard anyone explain how the size of the virtual region
for the JVM in an Applet is determined and if there is any way to
change it. I suspect it is chosen by the browser maker in a secret
ceremony involving small mammals.

Use the control panel that comes with the JRE to provide arguments to
the plugin.

/gordon

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top