title: Sort Java Collection
body: <p>I have a Java collection:</p>
  
  <pre><code>Collection&lt;CustomObject&gt; list = new ArrayList&lt;CustomObject&gt;();
  </code></pre>
  
  <p><code>CustomObject</code> has an <code>id</code> field now before display list I want to sort this collection by that <code>id</code>.</p>
  
  <p>Is there any way I could that do that? </p>