2020.8.6第三十一天
1.今天学习打印流
以后打印文件首选PrintStream
1 import java.io.FileNotFoundException; 2 import java.io.FileOutputStream; 3 import java.io.PrintStream; 4 public class PrintStreamDemo{ 5 public static void main (String[] args) throws FileNotFoundException{ 6 PrintStream out = new PrintStream ( 7 new FileOutputStream ("D:/Hello.txt")); 8 out.println(true); 9 out.println('A'); 10 out.println(10.0); 11 out.println(12); 12 out.println("Hello"); 13 Person p=new Person(); 14 p.setAge (20); 15 p.setName ("sky"); 16 out.println (p); 17 out.close(); 18 } 19 }
2.今天写了好长时间读后感
3.明天继续学习第12章