валидатор не пускает
package com.javarush.task.task18.task1817;
/*
Пробелы
*/
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
public class Solution {
public static void main(String[] args) throws IOException {
FileInputStream fileInputStream = new FileInputStream(args[0]);
String s = args[0];
int anyCount = s.length();
int noSpaceCount = s.replaceAll(" ","").length();
int countSpace = anyCount - noSpaceCount;
double result = 100*countSpace/anyCount;
fileInputStream.close();
System.out.printf("%2f",result);
}
}