public abstract class Reader extends Object implements Readable,Closeable
public class Test000 {
public static void main(String[] args) throws Exception{
File file=new File("D:\\hello\\d.txt");
if(file.exists()){//若文件存在进行读取
Reader in=new FileReader(file);
char data[]=new char[1024];
int len=in.read(data);
System.out.println("读取内容:"+new String(data,0,len));
in .close();
}
}
}