count number of duplicate characters in a string java using hashmapの検索結果