title: compare all elements of arraylist with first element
body: <pre><code> int odo_str=o.getSpans();
  ArrayList&lt;integer&gt; newlist = new ArrayList&lt;integer&gt;();
   newlist.add(odo_str);
  </code></pre>
  
  <p>In an arraylist how to compare all elements with first element in the arraylist,if it is greater than first element then i want to store them in one array,if elements are less than first element then want to store them in another arraylist.how to do it.thanks.</p>