How to group identical strings in to any collection?
<p>I have a string looks like</p>

<pre><code> {APP,LEE,APP,KCC,KCC,LEE,APP}.
</code></pre>

<p>I want to push same values like APP, LEE, KCC into different arraylists(any    collection) respectively.</p>

<p>For example: </p>

<ul>
<li>arraylist 1 should have {APP,APP,APP}</li>
<li>arraylist 2 should have {KCC,KCC}</li>
<li>arraylist 3 should have {LEE,LEE}</li>
</ul>

<p>So that i can identify how many distinct groups are there and whats their value.</p>

<p>Thanks in advance.</p>
