protected void copy2DArray(int from[][],int to[][]){
  for (int i=0; i < from.length; i++) {
    to[i]=new int[from[i].length];
    System.arraycopy(from[i],0,to[i],0,from[i].length);
  }
}

protected void copy2DArray ( int from [ ] [ ] , int to [ ] [ ] ) { for ( int i = 0 ; i < from . length ; i ++ ) { to [ i ] = new int [ from [ i ] . length ] ; System . arraycopy ( from [ i ] , 0 , to [ i ] , 0 , from [ i ] . length ) ; } }
copies one array of type int [ ] [ ] to another .
