标签:输出 throw 文件中 port color bsp stat put style
import java.io.File; import java.io.IOException; import java.io.FileOutputStream; import java.io.PrintStream; public class B { public static void main(String[] args)throws IOException { File f=new File("e://out.txt"); FileOutputStream fileOutputStream = new FileOutputStream(f); PrintStream printStream = new PrintStream(fileOutputStream); System.setOut(printStream); System.out.println("默认输出到了文件 out.txt"); } }
标签:输出 throw 文件中 port color bsp stat put style
原文地址:https://www.cnblogs.com/anningkang/p/11386632.html