Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using a 3D array

807597Feb 8 2005 — edited Feb 8 2005
Hi

I want to put 3 variables into an array like [1][2][3]
but there are over 40,000 of these, varies every time.
I want my array to look like [1][2][3]
[2][3][4]
[5][5][6]
all the ways down

I am declaring it as int [][][] numArray= new int[40000][40000][40000]
Is this right because when I compile it I get an out of memory exception

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 8 2005
Added on Feb 8 2005
5 comments
201 views