title: `ArrayList of HashMap` or `LinkedHashMap` to get item by index
body: <p>My need to store a a huge amount of data in the key-value form.
  Also, I have two requirements</p>
  
  <ol>
  <li>query data via the index, like from an array. </li>
  <li>hence the order in the data structure must be preserved. </li>
  </ol>
  
  <p>For Requirement 2 - I can use a <a href="http://docs.oracle.com/javase/6/docs/api/java/util/LinkedHashMap.html" rel="nofollow noreferrer">LinkedHashMap</a>.</p>
  
  <p>For Requirement 1 - I have two options : </p>
  
  <ul>
  <li>1.1 | To implement <strong>an ArrayList Of HashMap</strong>. [<code>ArrayList&lt;HashMap&lt;String,String&gt;&gt;</code>]</li>
  <li>1.2  | To implement a <strong>LinkedHashMap</strong> and query the items by index using something like
  
  <ul>
  <li>-> <code>new ArrayList(hashMapObject.entrySet()).get(0);</code></li>
  </ul></li>
  </ul>
  
  <p>The Question is which is better among <code>1.1</code> or <code>1.2</code> ? </p>
  
  <p>By better, I mean - <strong>efficient in terms of memory and space.</strong></p>
  
  <p>Let's assume the volume of data is in the order of 50 to 100 key-value pairs with average sized Strings - say every key is 10-30 characters and value is 30-50 characters.</p>