• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multi-dimensional array

 
Kannan Raju
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

 
Marcos Vilela
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Think of this in terms of array of arrays.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic