title: Get index of an arraylist using property of an contained object in java
body: <p>I'm having an list of Object type. In that I have one String property idNum. Now I want to get the index of the object in the list by passing the idNum.</p>
  
  <pre><code>List&lt;Object1&gt; objList=new ArrayList&lt;Object1&gt;();
  </code></pre>
  
  <p>I don't know how to give <code>objList.indexOf(// Don't know how to give here);</code></p>
  
  <p>Is it possible to do this without iterating the list. I want to use <code>indexOf()</code> method only.</p>