3 Replies Latest reply on May 12, 2007 2:39 PM by 807600

    2 dimensional array

    807600
      I've got a 2 dimensional array :
      int [][] arr = new int[3][];
      So thats an array holding 3 int arrays, to set the length of those 3 arrays I go :
      arr[0] = new int[4];
      arr[1] = new int[5];
      arr[2] = new int[2];
      This is fine but is there any way to do all that initializing etc in one line, like
      int[] [] arr = new int[3], [[4][5][2]];
      or something ?