Trying to print the frequency of integers in an array
<p>I'm trying to print out the frequency of each integer in an array</p>

<pre><code>import java.util.*;
public class NumFrequency {

    public static void main(String [] args) {

      Scanner input = new Scanner(System.in);

      System.out.println("Enter the amount of numbers your going to input, up to 50");
      int num = input.nextInt();
      int array[] = new int[num];

      System.out.println("Enter the "+ num + " numbers now.");

      for (int i=0 ; i&lt;array.length; i++) {
          array[i] = input.nextInt();
      }

      System.out.println("array created");
      printArray(array);


    }

    public static void printArray(int arr[]){
        int n = arr.length;

        for (int i=0; i&lt;n; i++) {
            System.out.print(arr[i]+" ");
        }
    }
    private static int[] intFreqArray = new int[51];
    public static void FreqOfInt(int[] array, int num) {
        for (int eachInt : array) {
            intFreqArray[eachInt]++;
        }

        for (int m = 0; m&lt;intFreqArray.length; m++) {
            if (intFreqArray[m] &gt; 1) {
                System.out.println(m+ " occurs " + intFreqArray[m] + " times.");
            }
        }

    }
}
</code></pre>

<p>It'll print out the array created by the user but nothing after that I'm lost as to why it wont print out the last part.</p>
