Вроде все потоки закрыл , но по условию не проходит
package com.javarush.task.task18.task1824;
/*
Файлы и исключения
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws IOException {
// try {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String fileName = null ;
InputStream file = null;
while (true) {
try {
try {
fileName = reader.readLine();
}
catch (IOException ioex){
// System.out.println("j-1");
}
file = new FileInputStream(fileName);
}
catch (FileNotFoundException f) {
System.out.println(fileName);
try {
// System.out.println("j0");
file.close();
}
catch (NullPointerException n){
// System.out.println("j");
}
// System.out.println("s");
reader.close();
break;
}
}
}
// try {
//
//
//
// }
// catch (NullPointerException n){
// }
// reader.close();
// }
// catch (NullPointerException nul){
//
// }
}