hashmap initialization with preexisting values?
<p>If i have an <code>int[] array = {1, 2, 3}</code> and I want to initialise the hashmap with values below, is there a better way to do it ? </p>

<pre><code>Map&lt;Integer,Boolean&gt; map = new HashMap&lt;Integer,Boolean&gt;();
            map.put(1,false);
            map.put(2,false);
            map.put(3,false);
</code></pre>
