public static String toString(int M_[][]){
  StringBuilder sb=new StringBuilder();
  for (int j=0; j < M_.length; j++) {
    for (int k=0; k < M_[j].length; k++) {
      String num=String.format("%5d",M_[j][k]);
      sb.append(num);
    }
    sb.append("\n");
  }
  return sb.toString();
}

public static String toString ( int M_ [ ] [ ] ) { StringBuilder sb = new StringBuilder ( ) ; for ( int j = 0 ; j < M_ . length ; j ++ ) { for ( int k = 0 ; k < M_ [ j ] . length ; k ++ ) { String num = String . format ( "%5d" , M_ [ j ] [ k ] ) ; sb . append ( num ) ; } sb . append ( "\n" ) ; } return sb . toString ( ) ; }
tostring - return a string representation .
