PrintWriter
Klasse hat keinen Konstruktor, der File, Boolean
akzeptiert
Am besten entfernen Sie die Boolean
und geben Sie einfach die File
.
Komplette Liste genommen von Oracle
PrintWriter(File file)
Creates a new PrintWriter, without automatic line flushing, with the specified file.
PrintWriter(File file, String csn)
Creates a new PrintWriter, without automatic line flushing, with the specified file and charset.
PrintWriter(OutputStream out)
Creates a new PrintWriter, without automatic line flushing, from an existing OutputStream.
PrintWriter(OutputStream out, boolean autoFlush)
Creates a new PrintWriter from an existing OutputStream.
PrintWriter(String fileName)
Creates a new PrintWriter, without automatic line flushing, with the specified file name.
PrintWriter(String fileName, String csn)
Creates a new PrintWriter, without automatic line flushing, with the specified file name and charset.
PrintWriter(Writer out)
Creates a new PrintWriter, without automatic line flushing.
PrintWriter(Writer out, boolean autoFlush)
Creates a new PrintWriter.
Haben Sie darüber nachgedacht, die Javadoc Beratung? Du kannst nicht einfach Dinge erfinden und dich dann wundern, warum sie nicht existieren. – EJP
@Tom Mögliche Duplikate wie? – EJP
@EJP OP _clearly_ möchte einen 'PrintWriter' instanziieren, der an eine existierende Quelle anfügt und die Antworten sagen ihm, wie es geht. – Tom