Difference between java.io.PrintWriter and java.io.BufferedWriter?

后端 未结 8 1353
南笙
南笙 2020-12-02 06:04

Please look through code below:

// A.class
File file = new File(\"blah.txt\");
FileWriter fileWriter = new FileWriter(file);
PrintWriter printWriter = new P         


        
8条回答
  •  有刺的猬
    2020-12-02 06:54

    BufferedWriter - Writes text to an output character stream, buffering characters from a character stream. PrintWriter - Prints formatted representations of objects to a text output stream.

提交回复
热议问题