Не могу понять почему не проходит валидацию.
В консоль выводится отсортированный результат.
Спасибо кто поможет разобраться что надо валидатору.
package com.javarush.task.task18.task1821;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
/**
Встречаемость символов.
*/
public class Solution {
/**
*
* @param args filename.
*/
public static void main(String[] args) throws FileNotFoundException, IOException {
FileInputStream fileInputStream = new FileInputStream(args[0]);
HashMap<Integer, Long> signs = new HashMap<>();
while (fileInputStream.available() > 0) {
Integer read = fileInputStream.read();
if (!signs.containsKey(read)) {
signs.put(read, (long)1);
} else {
Long value = signs.get(read) + 1;
signs.put(read, value);
}
}
fileInputStream.close();
for (int i = 32; i < 128; i++) {
if (signs.containsKey(i)) {
Character key = (char)Integer.parseInt(String.valueOf(i));
System.out.println(key.toString() + " " + signs.get(i));
}
}
}
}