title: Create a map with key and value in one line in Java
body: <p>Is there a way to create a map with keys and values at the same time (I mean a one-line code)? For example, I create a map named map, and I need to use the method "put" whenever I want to add a new pair of key/value. Is there a shorter way to populate a map when we create it?</p>
  
  <pre><code>Map&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
      map.put("A", "32");
      map.put("C", "34");
      map.put("T", "53");
  </code></pre>