title: Better way to find index of item from ArrayList<CustomObject>
body: <p>First of all, please correct me If I am wrong. I want to find index of Item (i.e String value) from <code>ArrayList&lt;CustomType&gt;</code> without using For Loop.</p>
  
  <p>POJO:</p>
  
  <pre><code>id;
  name;
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>ArrayList&lt;POJO&gt; list = new ArrayList&lt;POJO&gt;;
  
  //Lots of data added to these list...
  </code></pre>
  
  <p><strong>Now I want to find the id of particular name from the arraylist without using below kind of for loop.</strong></p>
  
  <pre><code>String id = null;
  // TODO Auto-generated method stub
  for (int i = 0; i &lt; list.size(); i++) {
      if("ABCD".equalsIgnoreCase(list.get(i).getName())) {
          id = list.get(i).getId();
          break;
      }
  }
  </code></pre>
  
  <p>Ideally I don't want to implement the For loop because in some cases i have 500+ data inside the List and to find index using a For loop is not a good way to do this.</p>