title: Which is better HashMap vs POJO ( Getter Setter , Model Class) in Java and Android
body: <p>In some cases i suffered the operation at that time,</p>
  
  <p>We can use the both HashMap or Model Class (POJO) as a ArrayList Generic Like <code>ArrayList&lt;HashMap&lt;K,V&gt;&gt;() OR ArrayList&lt;ModelName&gt;()</code>.</p>
  
  <p>Can you suggest me which is the better as a memory point of view and performances vise.</p>
  
  <p>I know both are the better in it place, but i just want to know if i have option to take both alternative.... which will the better ?</p>
  
  <p>e.g.
  Suppose i have 2 variable both are string in POJO class, and same both are for HashMap.</p>
  
  <p>so we have the list objects Like.. </p>
  
  <pre><code>  final  ArrayList&lt;Abc&gt; listAbc = new ArrayList&lt;Abc&gt;();
  
   for(final int i=0;i&lt;2;i++){
      Abc modelAbc = new Abc();
      abc.setName("name");
      abc.setLastName("lastName");
      listAbc.add(modelAbc);
    }
  </code></pre>
  
  <p>in this case i have to take two object of ABC class,</p>
  
  <p>And in HashMap with List object it will...</p>
  
  <pre><code>final ArrayList&lt;HashMap&lt;String,String&gt;&gt; listMap = new ArrayList&lt;HashMap&lt;String,String&gt;&gt;();
  
  for(final int i=0;i&lt;2;i++){
   HashMap&lt;String,String&gt; hashAbc = new HashMap&lt;String,String&gt;();
   hashAbc.put("NAME","firstName");
   hashAbc.put("LASTNAME","lastName");
   listMap.add(hashAbc);
  }
  </code></pre>
  
  <p>in this case i have to use two object of HashMap.</p>
  
  <p>Now tell me which will i have to use for better performance? 
  Which is occupier of high memory ? </p>