title: How to iterate through LinkedHashMap with lists as values
body: <p>I have following LinkedHashMap declaration.</p>
  
  <pre><code>LinkedHashMap&lt;String, ArrayList&lt;String&gt;&gt; test1
  </code></pre>
  
  <p>my point is how can i iterate through this hash map.
  I want to do this following, for each key get the corresponding arraylist and print the values of the arraylist one by one against the key.</p>
  
  <p>I tried this but <em>get</em> only returns string,</p>
  
  <pre><code>String key = iterator.next().toString();  
  ArrayList&lt;String&gt; value = (ArrayList&lt;String&gt; )test1.get(key)
  </code></pre>