2024-07-02 11:36:39
2024-07-02 19:26:43
public BufferedReader(Reader in) {
this(in, defaultCharBufferSize);
}
public BufferedReader(Reader in, int sz) {
...
this.in = in;//FileReader
...
}
看BufferedReader的close方法:
public void close() throws IOException {
...
in.close();//调用FileReader的close方法
...
}
调用BufferedReader的close()方法就可以调用FileReader的close()方法,所以楼上的回答不正确.