title: how to get minimum index number in arraylist java?
body: <p>i m using this code for getting index number but i can't get minimum index number </p>
  
  <pre><code>    for(String it : list1){
          index = list.indexOf(it);
          System.out.println("\n index1 : " +it);        
      }
  
      for(String it1 : list1){
          index1 = list.indexOf(it1);
          System.out.println("\nindex2 : " +it1);        
      }
  </code></pre>