private static void writeln(String line){
  try {
    writer.write(line);
    writer.write("\n");
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

private static void writeln ( String line ) { try { writer . write ( line ) ; writer . write ( "\n" ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } }
writes a line to the writer , a new line is added at the end .
