File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Multi-dimensional 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 » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Multi-dimensional array" Watch "Multi-dimensional array" New topic
Author

Multi-dimensional array

Kannan Raju
Ranch Hand

Joined: Jul 07, 2005
Posts: 44
Hi,

Can someone please explain how the following code works? Thanks.



SCJP1.4<br />SCWCD (in progress)
Marcos Vilela
Greenhorn

Joined: Jul 06, 2005
Posts: 18
String[][][] arr ={

{ { "a", "b", "c"}#arr[0][0]#, {"d", "e", null}#arr[0][1]# }, //arr[0][][]
{ {"x"}#arr[1][0]#, null }, //arr[1][][]
{ {"y"}#arr[2][0]#}, //arr[2][][]
{ { "z", "p"}#arr[3][0]#, {}#arr[3][1]# } //arr[3][][]


};


To get �y� -> String test = arr[2][0][0];
To get �null� ->String test1 = arr[0][1][2];

[ July 15, 2005: Message edited by: Marcos Vilela ]
[ July 15, 2005: Message edited by: Marcos Vilela ]
Shweta R Dhaneshwar
Ranch Hand

Joined: May 27, 2005
Posts: 35
Hi,
Think of this in terms of array of arrays.


Shweta Dhaneshwar.<br />SCJP 1.4 90%
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multi-dimensional array