aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "3-D Array" Watch "3-D Array" New topic
Author

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

thanks


Thanks.
Giovanni De Stefano
Ranch Hand

Joined: Aug 17, 2004
Posts: 144
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:


Giovanni


SCJP 1.4
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: 3-D Array