The mentor says "the program displays too few lines", but when I run the program it runs and show all the numbers
package com.codegym.task.task13.task1326;
/*
Sorting even numbers from a file
*/
import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
public class Solution {
public static void main(String[] args) {
//write your code here
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String fileName = br.readLine();
FileInputStream fis = new FileInputStream("C:\\" + fileName + ".txt");
ArrayList<Integer> list = new ArrayList<Integer>();
int num, numChar2;
String numStr = "";
do {
num = fis.read();
if (num !=10 && num != -1) {
if (num !=13) {
numStr = numStr + (char) num;
}
} else {
if (Integer.parseInt(numStr) % 2 == 0) {
list.add(Integer.parseInt(numStr));
}
numStr = "";
}
}
while (num != -1);
fis.close();
Collections.sort(list);
for (Integer numList : list){
System.out.println(numList);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.getMessage();
}
}
}