How to count the number of occurance of specific element in array/list
<p>I am new to java and develeping a small application in java, right now i stuck at a point. I have a custom class named Candidate. It looks like: </p>

<pre><code>=============================
|Candidate Class            |
=============================
|Private Members:           |
|Node Array                 |
|IsValid Bool               |
-----------------------------
|Public Methods:            |
|AddCandidateNode           |
|SetIsValid                 |
|ComparisonOperatorOverloaded|
=============================
</code></pre>

<p>Now i have a an array containing list of all candidates and i want to know the frequency of occurrence of each candidate in that array. One way i have in my mind is to write two loops and make comparisons using the overloaded method. But i don't want to use that. So i just want to conform that is there any built in method that did the same for me?</p>
