public static String toString(int partition[][]){
  StringBuilder sb=new StringBuilder();
  sb.append("{");
  for (int i=0; i < partition.length; i++) {
    sb.append(" " + Arrays.toString(partition[i]));
  }
  sb.append(" }");
  return sb.toString();
}

public static String toString ( int partition [ ] [ ] ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( "{" ) ; for ( int i = 0 ; i < partition . length ; i ++ ) { sb . append ( " " + Arrays . toString ( partition [ i ] ) ) ; } sb . append ( " }" ) ; return sb . toString ( ) ; }
tostring - a string representation for the super - class partition ' partition ' .
