title: Java List<String> to Map<String, Integer> convertion
body: <p>I'd like to convert a <code>Map &lt;String, Integer&gt;</code> from <code>List&lt;String&gt;</code> in java 8 something like this:</p>
  
  <pre><code>Map&lt;String, Integer&gt; namesMap = names.stream().collect(Collectors.toMap(name -&gt; name, 0));
  </code></pre>
  
  <p>because I have a list of Strings, and I'd like to to create a Map, where the key is the string of the list, and the value is Integer (a zero).</p>
  
  <p>My goal is, to counting the elements of String list (later in my code).</p>
  
  <p>I know it is easy to convert it, in the "old" way;</p>
  
  <pre><code>Map&lt;String,Integer&gt; namesMap = new HasMap&lt;&gt;();
  for(String str: names) {
    map1.put(str, 0);
  }
  </code></pre>
  
  <p>but I'm wondering there is a Java 8 solution as well.</p>