In my case, the program works properly but according to CodeGym, it does not .
package pl.codegym.task.task18.task1821;
/*
Częstotliwość występowania symboli
*/
import java.io.FileInputStream;
import java.io.IOException;
import java.util.*;
public class Solution {
public static void main(String[] args) {
// String nameOfFile = "C:\\Users\\Admin\\Desktop\\test.txt";
int [] valueInts = new int[256];
try (FileInputStream fileInputStream = new FileInputStream(args[0])){
while (fileInputStream.available() > 0){
int tempBajt = fileInputStream.read();
valueInts[tempBajt]++;
}
} catch (IOException ex){
System.out.println(ex.getStackTrace());
}
for (int i = 0; i < valueInts.length; i++){
char c = (char)i;
System.out.println(c + " " + valueInts[i]);
}
}
}