A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Beginning Java
Author
Three Dimensional Array
Sohrab Khan Niazi
Greenhorn
Joined: Oct 05, 2001
Posts: 3
posted
Oct 05, 2001 06:23:00
0
How we can used 3 Dimensional Array?
Nathan Pruett
Bartender
Joined: Oct 18, 2000
Posts: 4121
I like...
posted
Oct 05, 2001 06:53:00
0
You'll need to give a little bit more information on what exactly is giving you trouble with 3 dimensional arrays...
Here's how to create and instantiate a 3 dimensional array...
int[][][] array3D = new int[5][5][5]; for( int i = 0; i < array3D.length; i++ ) { for( int j = 0; j < array3D[].length; j++ ) { for( int k = 0; k < array3D[][].length; k++ ) { array[i][j][k] = i+j+k; } } }
-Nate
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
http://jrebel.com/download
subject: Three Dimensional Array
Similar Threads
about hashmap implementation of arraylist
Object reference array assignment
How to create this String array
one more certpal question
Doubt in Array Declaration
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter