2021.6.18笔记 打印流
作者:互联网
public class PrintClass {
public static void main(String[] args) throws FileNotFoundException {
PrintStream ps = new PrintStream("H:\\test\\mm.txt");
ps.write(97);
ps.println(97);
ps.close();
}
}
public class PrintStrNew {
public static void main(String[] args) throws FileNotFoundException {
System.out.println("正常打印输出");
PrintStream ps = new PrintStream("H:\\test\\mm.txt");
System.setOut(ps);
System.out.println("我在文件里面了");
ps.close();
}
}
标签:ps,PrintStream,2021.6,18,System,笔记,static,println,public 来源: https://blog.csdn.net/q4451728/article/details/118022666