File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes 3-D Array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "3-D Array" Watch "3-D Array" New topic

3-D Array

Vilpesh Mistry
Ranch Hand

Joined: May 27, 2003
Posts: 62

How to add data in a 3-d array in java.

I have hard coded & stored the data as
double mydetails[][][] = new double[][][]{ ( {0.1,0.2 },{0.5} }, ( {0.1,0.2 },{0.5} }, ( {0.1,0.2 },{0.5} } }

Now i do not want to hard code the real data but fill in the data dynamically so how do i do that


Giovanni De Stefano
Ranch Hand

Joined: Aug 17, 2004
Posts: 154
This seems to be a question for the beginner forum more than the intermediate.
BTW if you are having hard time figuring out how to actually access, read and/or modify the elements in the n-dimensional array, and you have no time to try on your own, here is a code snippet that might help you out:


SCJP 1.4
I agree. Here's the link:
subject: 3-D Array
jQuery in Action, 3rd edition