Hey Mates!
What I left out. Inappropriate char range?
If 4th req is accepted, then 3rd should be too?
65-90 A-Z
97-122 a-z
package pl.codegym.task.task18.task1816;
/*
ABC
*/
import java.io.FileInputStream;
import java.io.IOException;
public class Solution {
public static void main(String[] args) throws IOException {
FileInputStream fileInputStream = new FileInputStream(args[0]);
int counter = 0;
while (fileInputStream.available() > 0) {
if(fileInputStream.read() >= 65 && fileInputStream.read() <= 90) {
counter++;
} else if (fileInputStream.read() >= 97 && fileInputStream.read() <= 122) {
counter++;
}
}
fileInputStream.close();
System.out.println(counter);
}
}