I can't check my output bcs I don't know how to check it in Intelij :( can smb tell me what is wrong and maybe some hints :)
package pl.codegym.task.task18.task1804;
import java.io.FileInputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
/*
Najrzadziej występujące bajty
*/
public class Solution {
public static void main(String[] args) throws Exception {
HashMap<Integer, Integer> mapa = new HashMap<Integer, Integer>(); ///mapa
ArrayList<Integer> lista = new ArrayList<>(); ///lista
/// z konsoli i do File readera
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String fileName = reader.readLine();
reader.close();
FileInputStream inputStream = new FileInputStream(fileName);
/// maxymalna
int temp = inputStream.read();
int max = temp;
///obliczanie max i dodawanie do listy
while(temp > 0){
if(!lista.contains(temp))
mapa.put(temp,1);
else{
int Value = mapa.get(temp);
mapa.put(temp, Value+1);
}
if(temp > max)
max = temp;
temp = inputStream.read();
lista.add(temp);
}
inputStream.close();
for(Integer iteror : mapa.keySet()){
if(max == mapa.get(iteror)){
System.out.print(mapa.get(iteror)+ " ");
}
}
}}