Help ! How to solve this task by map method ?怎么通过map方法来解决这个任务? Task requirement:Enter 10 strings from the keyboard and count the number of different letters in them (for 26 lowercase English letters). The results are displayed in alphabetical order on the screen. 任务要求:从键盘输入 10 个字符串,并计算其中的不同字母数(针对 26 个小写英文字母)。在屏幕上按字母顺序显示结果。
package zh.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;

/*
字母数
*/

public class Solution {

    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        // 字母
        String abc = "abcdefghijklmnopqrstuvwxyz";
        char[] abcArray = abc.toCharArray();
        HashMap<Character, Integer> abcmap = new HashMap<Character, Integer>();
        for (char letter : abcArray) {
            abcmap.put(letter,0);
        }

        ArrayList<Character> alphabet = new ArrayList<>();
        for (char letter : abcArray) {
            alphabet.add(letter);
        }

        // 读取字符串
        ArrayList<String> list = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            String s = reader.readLine();
            list.add(s.toLowerCase());
        }

        HashMap<Character, Integer> copy = new HashMap<>(abcmap);
        int count =0;
        for (Character key : copy.keySet()){
            for (int i =0;i<10;i++){
                if (list.get(i).indexOf(key){
                    count++;
                    }
                }
            }
            count = 0;
        // 在此编写你的代码
    }
}