Sort a list according to a property java : <p>I have a list of Strings </p>

<pre><code>ArrayList&lt;String&gt; titles = t1,t1,t2,t2,t3,t3,t3
</code></pre>

<p>I want a sublist with the unique values ie. <code>titles2 = t1,t2,t3</code></p>

<p>How can I do this? Any help is appreciated</p>
