You can use charas a means to access the array, for example ...
ArrayList<String> list = new ArrayList<>(Arrays.asList(new String[]{"hello", "goodbye", "morning", "night"}));
int[] results = new int[26];
for (String value : list) {
for (char c : value.toCharArray()) {
results[c - 'a'] += 1;
}
}
As a result ...
[0, 1, 0, 1, 2, 0, 3, 2, 2, 0, 0, 2, 1, 3, 4, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0]
nb: , , . , , a z,