import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import day10.Test;
public class Sample19 {
private static char[] s;
public static void main(String[] args) {
// TODO Auto-generated method stub
try{
//定义BufferedReader处理流的引用
BufferedReader br = null;
//定义BufferedWriter处理流的引用
BufferedWriter bw = null;
//定义PrintWriter处理流的引用
PrintWriter out = null;
//将指定的FileReader节点流封装成处理流
br = new BufferedReader(new FileReader("Sample19.java"));
//将指定的FileWriter节点流封装成处理流
bw = new BufferedWriter(new FileWriter("Test.txt"));
//将BuffereWriter处理流再封装为打印流
out = new PrintWriter(bw);
//将读取的一行内容写入指定的文件
out.println(s);
//将读取的一行内容大意在控制台
System.out.println(s);
}catch(Exception e ){
e.printStackTrace();
}
}
}
显示java.io.FileNotFoundException: Sample19.java (系统找不到指定的文件。)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at java.io.FileReader.<init>(FileReader.java:41)
at day20.Sample19.main(Sample19.java:53)
为什么呢