4 Replies Latest reply: Jun 13, 2008 2:21 AM by 807601 RSS

    Tridimensional array.

    807601
      How do you declare and initialize a tridimensional array?


      I need an array of [81][16][16].




      int [][][]mat;



      Inside the constructor you write:



      for(t=0;t<mat.length;t++){


      mat[t]=new int[81];

      for(r=0;r<mat.length;r++){

      mat[t][r]=new int[16];


      for(c=0;c<mat.length;c++){


      mat[t][r][c]=new int[16];


      }


      }


      }