Guys, will somebody please help. I've looked through the help section and can't find a solution. What am I doing wrong?
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)throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
InputStream fileName = new FileInputStream(reader.readLine());
BufferedReader input = new BufferedReader(new InputStreamReader(fileName));
ArrayList<Integer> numbers = new ArrayList<>();
while (input.readLine() != null) {
int data = input.read();
if (data % 2 == 0)
numbers.add(data);
}
input.close();
Collections.sort(numbers);
for (int number : numbers) {
System.out.println(number);
}
}
}