I tried many times on IntelliJ but it doesn't verify. The third and fourth requirements are not met. When I run on IntelliJ, I input random words from the keyboard, but it doesn't let me enter more than one line. If I press enter, It automatically ends and says "Process finished with exit code 0". But it doesn't output anything...I'm not sure if the problem is I need an actual file or it's something about my code. Help!
package com.codegym.task.task13.task1326;
/*
Sorting even numbers from a file
*/
import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Collections;
public class Solution {
public static void main(String[] args) throws IOException {
FileInputStream fileLines = new FileInputStream(new BufferedReader(new InputStreamReader(System.in)).readLine());
BufferedReader reader = new BufferedReader(new InputStreamReader(fileLines));
List<Integer> list = new ArrayList<>();
while (Integer.parseInt(reader.readLine()) % 2 == 0 && reader.readLine() != null) {
int lines = Integer.parseInt(reader.readLine());
list.add(Integer.parseInt(reader.readLine()));
}
fileLines.close();
Collections.sort(list);
for (Integer a : list) {
System.out.println(a);
}
}
}