почему 3 и 5 пункт по валидатору не проходят?
package com.javarush.task.task18.task1823;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
/*
C:\Users\MAX\Pictures\textForJava.txt
C:\Users\MAX\Pictures\secondTestTextForJava.txt
*/
public class Solution {
public static Map<String, Integer> resultMap = new HashMap<String, Integer>();
public static void main(String[] args) throws InterruptedException {
Scanner scanner = new Scanner(System.in);
String fileName = scanner.nextLine();
while (!fileName.equals("exit")) {
new ReadThread(fileName);
fileName = scanner.nextLine();
}
scanner.close();
}
public static class ReadThread extends Thread {
public ReadThread(String fileName) {
super(fileName);
start();
}
public void run() {
try (FileInputStream input = new FileInputStream(Thread.currentThread().getName())){
int[] bytes = new int[256];
int max = Integer.MIN_VALUE;
int tempByte;
while ((tempByte = input.read()) != -1) {
bytes[tempByte]++;
if (bytes[tempByte] > max) {
max = bytes[tempByte];
}
}
for (int i = 0; i < 256; i++) {
if (bytes[i] == max) {
resultMap.put(Thread.currentThread().getName(), i);
break;
}
}
} catch (IOException ioe){
}
}
}
}