How to sort user defined object in ArrayList
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2535124/how-to-sort-an-arraylist-of-objects-by-a-property">How to sort an arraylist of objects by a property?</a>  </p>
</blockquote>



<pre><code>    public static void main(String args[]){

            List&lt;Emp&gt; unsortList = new ArrayList&lt;Emp&gt;();

            unsortList.add(new Emp(109));
            unsortList.add(new Emp(106));
            unsortList.add(new Emp(103));
            unsortList.add(new Emp(108));
            unsortList.add(new Emp(101));
    }

public class Emp {
Integer eid;
public Emp(Integer eid) {
    this.eid=eid;
}
}
</code></pre>

<p>Emp is user defined class &amp; stored in ArrayList. How sort ArrayList.</p>
