How to sort elements in an ArrayList of Strings? <pre><code> PhoneBookCollection phoneBook = new PhoneBookCollection(); </code></pre> <p>I have an <code>ArrayList</code> of <code>PhoneBook</code> objects. (The getCollection method returns the list)</p> <pre><code>ArrayList&lt;PhoneBook&gt; list = phoneBook.getCollection(); </code></pre> <p><br> I then iterate through my ArrayList and get the <code>PhoneBook</code> at the i'th index and get its corresponding <code>Telephone</code>.</p> <pre><code>for(int i = 0; i &lt; list.size(); i++ ){ String phone = phoneBook.getPhoneBook(i).getTelephone(); } </code></pre> <p>What I want to be able to do now is sort the <code>getTelephone</code> objects in ascending order. I know that ArrayLists don't have a sort method so i'm having a bit of trouble doing this.</p>