//完成PrintStream的输出操作 package work; import java.io.* ; public class PrintDemo01{ public static void main(String arg[]) throws Exception{ PrintStream ps = null ; // 声明打印流对象 // 现在是使用FileOuputStream实例化,意味着所有的输出是向文件之中 ps = new PrintStream(new FileOutputStream(new File("H:\\wite.txt"))) ; ps.print("hello ") ; ps.println("我的祖国!") ; ps.print("20+500" + 520) ; ps.close() ; } }
//完成PrintStream的输出操作
于 2022-04-14 19:42:48 首次发布
关键词由CSDN通过智能技术生成