title: Android ArrayList iteration
body: <p>I have an ArrayList which stores Area names. I want to check this list to find whether arbitrary people are from different area. If they are from different area, i take a decision. I achieved this with the following code. Note that area_IdList  and area_IdListduplicate are essentially the same ArrayList. Is this code efficient or can anyone suggest more efficient code ? Thanks in Advance. </p>
  
  <pre><code>public List&lt;String&gt; area_IdList = new ArrayList&lt;String&gt;();
  public List&lt;String&gt; area_IdListduplicate = new ArrayList&lt;String&gt;();
  
  for (int i = 0; i &lt; area_IdList.size(); i++) 
  {  
      for (int k = 1; k&lt; area_IdListduplicate.size(); k++)
      {
          String sa= area_IdListduplicate.get(k);
          String sb= area_IdList.get(i);
          if (!sa.equalsIgnoreCase(sb))
          { 
              some decision
          }
      }             
  }
  </code></pre>