Code example for FileWriter

Methods: closeappend

0
      fn += ".java";
    } 
 
    try 
    { 
      FileWriter out = new FileWriter(fn);
      try 
      { 
        out.append(content);
      } 
      finally 
      { 
        out.close();
      } 
    } 
    catch (IOException e)
    { 
      // TODO: Exception Handling 
      e.printStackTrace();
    } 
Experience pair programming with AI  Get Codota for Java