Printwriter和ProsputStream有什么区别
首先,我们有PrintWriter
java.io.File f=new java.io.File("s.txt");
java.io.PrintWriter out=new java.io.PrintWriter(f);
out.print(5);
out.print(7);
out.close();
然后我们有输出流
java.io.File f=new java.io.File("s.txt");
java.io.FileOutputStream out=new java.io.FileOutputStream(f);
out.write(5);
out.write(7);
out.close();
有什么区别?