Like so many other people, it looks just like it's supposed to. I even tested it with numbers and I still get what appears to be the correct output. I haven't the slightest idea what the hold up is, which sucks as I thought I had this on the first try, and now I've tried it like 4 times.
package com.codegym.task.task10.task1012;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
/*
Number of letters
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
// Alphabet
String abc = "abcdefghijklmnopqrstuvwxyz";
char[] abcArray = abc.toCharArray();
ArrayList<Character> alphabet = new ArrayList<>();
for (char letter : abcArray) {
alphabet.add(letter);
}
// Read in strings
ArrayList<String> list = new ArrayList<>();
for (int i = 0; i < 10; i++) {
String s = reader.readLine();
list.add(s.toLowerCase());
}
HashMap<Character, Integer> tally = new HashMap<>();
for (int i = 0; i < 26; i++) {
tally.put(alphabet.get(i), 0);
}
for (String s : list) {
char[] letters = s.toCharArray();
try {
for (char entry : letters) {
int count = tally.get(entry);
tally.put(entry, count + 1);
}
}
catch (NullPointerException e) {}
}
Set<Map.Entry<Character, Integer>> set = tally.entrySet();
for (Map.Entry<Character, Integer> me : set) {
System.out.println (me.getKey() + " " + me.getValue());
}
}
}