 <p>You can use <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/HashMap.html" rel="nofollow"><code>HashMap&lt;K,V&gt;</code></a></p> <pre><code>Map&lt;String,int&gt; map = new HashMap&lt;String,int&gt;(); </code></pre>