Counting the repetition of an element of an array java
<p>I need to count the frequency of an element in arrays.
I used the method</p>

<pre><code>Collections.frequency(Arrays.asList(arr),element);
</code></pre>

<p>but I get zero all the times
any ideas ?!</p>