@@ -0,0 +1,1187 @@
+package com.javarush.task.task10.task1016;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.InputStreamReader;%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0A/* %0A%D0%9E%D0%B4%D0%B8%D0%BD%D0%B0%D0%BA%D0%BE%D0%B2%D1%8B%D0%B5 %D1%81%D0%BB%D0%BE%D0%B2%D0%B0 %D0%B2 %D1%81%D0%BF%D0%B8%D1%81%D0%BA%D0%B5%0A*/%0A%0Apublic class Solution %7B%0A    public static void main(String%5B%5D args) throws Exception %7B%0A        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));%0A%0A        ArrayList%3CString%3E words = new ArrayList%3CString%3E();%0A        for (int i = 0; i %3C 20; i++) %7B%0A            words.add(reader.readLine());%0A        %7D%0A%0A        Map%3CString, Integer%3E map = countWords(words);%0A%0A        for (Map.Entry%3CString, Integer%3E pair : map.entrySet()) %7B%0A            System.out.println(pair.getKey() + %22 %22 + pair.getValue());%0A        %7D%0A    %7D%0A%0A    public static Map%3CString, Integer%3E countWords(ArrayList%3CString%3E list) %7B%0A        HashMap%3CString, Integer%3E result = new HashMap%3CString, Integer%3E();%0A%0A        //%D0%BD%D0%B0%D0%BF%D0%B8%D1%88%D0%B8%D1%82%D0%B5 %D1%82%D1%83%D1%82 %D0%B2%D0%B0%D1%88 %D0%BA%D0%BE%D0%B4%0A        list.forEach(s -%3E %7B%0A            if (result.containsKey(s)) %7B%0A                result.replace(s, result.get(s), result.get(s) + 1);%0A            %7D else %7B%0A                result.put(s, 1);%0A            %7D%0A        %7D);%0A%0A        return result;%0A    %7D%0A%0A%7D%0A%0A

Complete task1016