Mrz 18

Welche dieser Codezeilen compilieren (nicht) einwandfrei?

BufferedWriter a = new BufferedWriter(new File(“Test1.txt”));
BufferedWriter b = new BufferedWriter(new FileWriter(“Test2.txt”));
BufferedWriter c = new BufferedWriter(new PrintWriter(“Test3.txt”));
BufferedWriter d = new BufferedWriter(new BufferedWriter(c));

Antwort/ answer
Tagged with:
Feb 25

Die Klasse BufferedWriter wrappt FileWriter.

Anstatt

FileWriter datei_schreiben = new FileWriter(datei);

in der Klasse FileWriter
wird der BufferedWriter mit

Writer datei_schreiben = new BufferedWriter(new FileWriter(datei));

definiert

Tagged with:
preload preload preload
http://www.wikio.de Blog Top Liste - by TopBlogs.de Blogverzeichnis - Blog Verzeichnis bloggerei.de Bloggeramt.de Software
Webbhotell Top Blogs