chapter07 补充1.pptVIP

  • 4
  • 0
  • 约2.81千字
  • 约 8页
  • 2017-11-17 发布于河南
  • 举报
chapter07 补充1

读取并输出指定文件的内容 import java.io.*; class T1{ public static void main(String[] args) throws IOException{ FileReader f=new FileReader(aa.txt); int c; while((c=f.read())!=-1) System.out.print((char)c); } } 读取并输出指定文件的内容 import java.io.*; class T1{ public static void main(String[] args) throws IOException{ FileInputStream f=new FileInputStream(aa.txt); int c; while((c=f.read())!=-1) System.out.print((char)c); } } 实现接收键盘输入的数据,并写到指定文件中 import java.io.*; class T2{ public static void main(String[] args) throws IOException{ InputStreamReader isr=new InputStreamReader(Sy

文档评论(0)

1亿VIP精品文档

相关文档