Array java help needed
<p>I have this program that takes user input and displays the number of times each integer is entered. I pretty much have it down pat but need another loop to omit the shown occurrence of 0. In other words any number with 0 in it cannot be read, also for some reason i am getting two outputs from the same number in my program. For example, if I enter <code>3,3</code> I will get <code>3 occurs 1 time</code> and <code>3 occurs 2 times</code> as output. The 2 times one being correct and the first one being incorrect.</p>

<pre><code>public class Six_Three {


public static void main(String[] args) {

    Scanner input = new Scanner (System.in);
    System.out.print("enter integers between 1 and 100: ");
    int[] num = new int[100];
    int data = input.nextInt();

    while ((data = input.nextInt()) != 0) {
        num[data]++;
    }

    for (int i = 1; i &lt; 100; ++i) { 
        if (num[i] &gt; 0) 
            System.out.println(i + " occurs " + num[i] + " times ");
    }
}
</code></pre>
