title: Java8: Create HashMap with character count of a String
body: <p>Wondering is there more simple way than computing the character count of a given string as below?</p>
  
  <pre><code>String word = "AAABBB";
      Map&lt;String, Integer&gt; charCount = new HashMap();
      for(String charr: word.split("")){
          Integer added = charCount.putIfAbsent(charr, 1);
          if(added != null)
              charCount.computeIfPresent(charr,(k,v) -&gt; v+1);
      }
  
      System.out.println(charCount);
  </code></pre>