Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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