I started with using Character.isLetter() and it was giving me the right answer and I was failing, and I thought the problem was that it was counting non-English letters (like maybe those weird Russian or Hebrew characters or something). So I did what everyone else is doing and changed it to check just the ASCII values within the specified English letter ranges. Spits out the same answer (the right one, I've hand-counted it from my file) and it still fails, and still says I'm not counting the lowercase letters.
Like, no, I am.
I don't want to just copy someone else's answer. I don't know if CodeGym is just being finicky or if there is some major oversight on my part. And this is why I created specifically this file for testing purposes on this site.
package com.codegym.task.task18.task1816;
/*
ABCs
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws IOException {
File file = new File ("C:\\Users\\Oliver\\Desktop\\Suicide.txt");
FileInputStream fis = new FileInputStream(file);
BufferedInputStream bis = new BufferedInputStream(fis, 200);
int count = 0;
int i;
while ((i = bis.read()) != -1) {
if ((i > 64 && i < 91) || (i > 96 && i < 123)){
count++;
}
}
bis.close();
System.out.println(count);
}
}