title: Java: Sorting an ArrayList<MyObject> based on a MyObject variable
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1206073/sorting-a-collection-of-objects">Sorting a collection of objects</a><br>
    <a href="https://stackoverflow.com/questions/1814095/sorting-an-arraylist-of-contacts-based-on-name">Sorting an ArrayList of Contacts based on name?</a>  </p>
  </blockquote>
  
  
  
  <p>A quick question for you:</p>
  
  <p>I've got an <code>ArrayList&lt;MyObject&gt;</code> filled with <code>MyObject</code> objects. I would like them to be sorted based on an integer variable of <code>MyObject</code>.</p>
  
  <p>Is there a ready way to implement this or will I have to write a quicksort/mergesort myself?</p>
  
  <p>Thank you for your time,
  Dimitris</p>