This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 60
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 3-D Array
 
Similar Threads
Multidimensional Arrays
assignments: too easy?
Round off a number
2D Array problem
getting the index of the closest value in an array that is sorted in reverse order