- public class Demo8 {
- public static void main(String[] args) throws IOException {
- for (int i = 0; i < 10; i++) {
- BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
- String readLine = br.readLine();
- System.out.println(readLine);
- br.close();
- }
- }
- }
复制代码 为什么循环一次后会发生Stream closed 流已关闭的异常?
|
|