public static void main(String[] args){
  int result;
  PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out,UTF_8));
  PrintWriter err=new PrintWriter(new OutputStreamWriter(System.err,UTF_8));
  try {
    Main formatter=new Main(out,err,System.in);
    result=formatter.format(args);
  }
 catch (  UsageException e) {
    err.print(e.getMessage());
    result=0;
  }
 finally {
    err.flush();
    out.flush();
  }
  System.exit(result);
}

public static void main ( String [ ] args ) { int result ; PrintWriter out = new PrintWriter ( new OutputStreamWriter ( System . out , UTF_8 ) ) ; PrintWriter err = new PrintWriter ( new OutputStreamWriter ( System . err , UTF_8 ) ) ; try { Main formatter = new Main ( out , err , System . in ) ; result = formatter . format ( args ) ; } catch ( UsageException e ) { err . print ( e . getMessage ( ) ) ; result = 0 ; } finally { err . flush ( ) ; out . flush ( ) ; } System . exit ( result ) ; }
the main method for the formatter , with some number of file names to format . we process them in parallel , but we must be careful ; if multiple file names refer to the same file ( which is hard to determine ) , we must serialize their updates .
