public void finish(){
  nextLine();
  out.flush();
}

public void finish ( ) { nextLine ( ) ; out . flush ( ) ; }
finishes the output by flushing the current line and takes care of any other cleanup action .
