מערכים דו ממדיים

public static void printArr(int [][] a){

       for (int row=0;row<a.length;row++){

              for (int col=0;col<a[0].length;col++){

                     System.out.print(a[row][col]+"\t");

              }

              System.out.println();

       }

}

      

public static void main(String[] args) {

      

       int [][] arr = new int[10][10];

      

       for (int row=0;row<arr.length;row++){

              for (int col=0;col<arr[0].length;col++){

                     arr[row][col] = (row+1)*(col+1);

              }

       }

       printArr(arr);

      

             

}