How do you count the elements of an array in java
<p>Say i have the array</p>

<pre><code>int theArray = new int[20];
</code></pre>

<p>The length of the array is 20 but the count is 0. How can i get the count?
Thanks</p>
