How to sort list of objects by some property
<p>I have simple class </p>

<pre><code>public class ActiveAlarm {
    public long timeStarted;
    public long timeEnded;
    private String name = "";
    private String description = "";
    private String event;
    private boolean live = false;
}
</code></pre>

<p>and List con. How to sort in asc order by timestarted, then by time ended ? Can anybody help ? I know in C++ with generic algorithm and overload operator &lt;, but I am new to Java.</p>
