4 Replies Latest reply on Jun 13, 2008 7:21 AM by 807601

    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];


      }


      }


      }