1. Member
Join Date
Jan 2011
Location
Oregon
Posts
4
Rep Power
0
If you're having trouble visualizing this in your mind, I found this website helpful: Multi-dimensional Arrays

Another way that works up to 3 is think of it as a cube.

2. Senior Member
Join Date
Mar 2009
Posts
126
Rep Power
0
Originally Posted by Chrizesu
If you're having trouble visualizing this in your mind, I found this website helpful: Multi-dimensional Arrays

Another way that works up to 3 is think of it as a cube.
thank you Chrizesu , let me check that link and come .:)

3. Once you get to 3d arrays it's a bit harder to visualize, but like said above a cube helps, You could also think of it as an array of chessboards. where each element in the original array contains a chesbboard(if this example didn't work well for you, feel free to ignore it)

but, each item in the array contains another multi-d array.

so element 1 has a 4x5 array, so does 2 and 3

Java Code:
```arr[0] = int[4][5];
arr[1] = int[4][5];
arr[2] = int[4][5];```

4. Senior Member
Join Date
Mar 2009
Posts
126
Rep Power
0
Originally Posted by sunde887
Once you get to 3d arrays it's a bit harder to visualize, but like said above a cube helps, You could also think of it as an array of chessboards. where each element in the original array contains a chesbboard(if this example didn't work well for you, feel free to ignore it)

but, each item in the array contains another multi-d array.

so element 1 has a 4x5 array, so does 2 and 3

Java Code:
```arr[0] = int[4][5];
arr[1] = int[4][5];
arr[2] = int[4][5];```

first of all thanks for your effort to making this noob to understand sunde887 ,

This 3d is really very tough to visualize buddy ,but as you said i am trying to visualize as a cube . ok let me try with the above example and please tell me whether i am correct or not ?

I take this line "arr[0] = int[4][5];" from above example - does it mean index "0" has "4" element at right side and "5"

elements towards it back side? :confused::confused::confused:
Last edited by funkygarzon; 01-25-2011 at 07:21 PM.

5. Senior Member
Join Date
Mar 2010
Posts
952
Rep Power
7
I really think you're giving this whole topic much more time and attention than it deserves. Two-dimensional arrays are not unusual, but everything else that's been discussed in this thread is so rare that you really shouldn't spend any time worrying about it. When you see arrays in actual programs, they will make much more sense than trying to think about them in the abstract.

-Gary-

6. yes, 3d arrays are pretty rate, element 0 though has a 2 d array with 3 elements, and each array element contains another array of 5 items.

It's a bit hard to exactly explain it, but like said above I don't think you will run into them very often and you will get much more familiar with added dimensions in arrays as time goes on, Im still a beginner, but I cant think of many reasons to use a 3d array. When I first learned about multi dimension arrays i was pretty confused.

7. Senior Member
Join Date
Mar 2009
Posts
126
Rep Power
0
Originally Posted by gcalvin
I really think you're giving this whole topic much more time and attention than it deserves. Two-dimensional arrays are not unusual, but everything else that's been discussed in this thread is so rare that you really shouldn't spend any time worrying about it. When you see arrays in actual programs, they will make much more sense than trying to think about them in the abstract.

-Gary-
Originally Posted by sunde887
yes, 3d arrays are pretty rate, element 0 though has a 2 d array with 3 elements, and each array element contains another array of 5 items.

It's a bit hard to exactly explain it, but like said above I don't think you will run into them very often and you will get much more familiar with added dimensions in arrays as time goes on, Im still a beginner, but I cant think of many reasons to use a 3d array. When I first learned about multi dimension arrays i was pretty confused.

yes buddies :( , i can feel that i am wasting more time in this topic , but i have understood 2d clearly but 3d not so clearly only some what i understood ... but as you all said i think i will feel comfortable in future with this 3d , after finishing my core java :) ...

Thank s a lot for all my friends who helped this noob ( me) making me to understand concept clearly , now i am in the topic called "operator" so if i had doubt i hope you all will help me like you all have did :) thanks . This forum rocks ..... i love this forum and got addicted to it o:o .. see you in the next topic guys ... :)

8. mark this thread solved if you are done (click thread tools and at the bottom you can choose "mark as solved")

9. Senior Member
Join Date
Mar 2009
Posts
126
Rep Power
0
Originally Posted by sunde887
mark this thread solved if you are done (click thread tools and at the bottom you can choose "mark as solved")

ooh for sure sunde887 , with pleasure ...thank you :):)

Page 2 of 2 First 12

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•