public static String toString(Pnt[] matrix){
  StringBuilder buf=new StringBuilder("{");
  for (  Pnt row : matrix)   buf.append(" " + row);
  buf.append(" }");
  return buf.toString();
}

public static String toString ( Pnt [ ] matrix ) { StringBuilder buf = new StringBuilder ( "{" ) ; for ( Pnt row : matrix ) buf . append ( " " + row ) ; buf . append ( " }" ) ; return buf . toString ( ) ; }
create a string for a matrix .
