Skip to content

Instantly share code, notes, and snippets.

@BMU-Verlag
Created July 9, 2020 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BMU-Verlag/cba8a7cf70e84813a51bb28308ff5ef3 to your computer and use it in GitHub Desktop.
Save BMU-Verlag/cba8a7cf70e84813a51bb28308ff5ef3 to your computer and use it in GitHub Desktop.
public static void dateiSchreiben(String inhalt, String dateiname){
try{
File datei =new File(dateiname);
datei.createNewFile();
BufferedWriter bw = new BufferedWriter(new FileWriter(dateiname, true));
bw.write(inhalt);
bw.close();
}
catch(IOException ioAusnahme){
System.out.println("Fehler beim Öffnen der Datei");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment