title: How to display the most frequently occurring letter and the number of matches using streams?
body: <p>I have a method that creates a list of random English letters and counts how many times each letter appears in the list. How to display only the letter that occurs most often and how many times does this letter occur in this list?</p>
  <pre><code>public class StreamPractice {
  
      public static void main(String[] args) {
          System.out.println(mostFrequentlyOccurringLetter());
      }
  
      private static Map&lt;String, Integer&gt; mostFrequentlyOccurringLetter() {
          return new Random().ints(100, 65, 91)
                  .mapToObj(i -&gt; String.valueOf((char) i))
                  .collect(Collectors.toMap(Function.identity(), value -&gt; 1, Integer::sum));
      }
  
  }
  </code></pre>