title: Populating a Java Map that maps alphabets corresponding to their alphabetic position using streams
body: <p>I am populating a <code>Map&lt;Character, Integer&gt;</code> <code>alphabetToNumber</code> which maps a letter corresponding to it alphabetical position </p>
  
  <pre><code>char [] alphabetArray = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray();
  Map&lt;Character, Integer&gt; alphabetToNumber = new HashMap&lt;&gt;();
  int counter = 1;
  for(Character letter : alphabetArray) {
      alphabetToNumber.put(letter, counter);
      counter++;
  }
  </code></pre>
  
  <p>The above code works but I was wondering if it can be done using Java 8 streams. Thanks.</p>