I want to store object of class based on sorted salary in List
<pre><code>class abc {
    String name;
    int id;
    int salary;
}

List list&lt;abc&gt;=new ArrayList();
</code></pre>

<p>Object of abc should be store based on sorted salary in List  like max salary will be stored first then 2nd max will be stored then 3rd and soo on.   </p>