Complete the method, named countOccurs, in the class named ArrayOps.java. There are two parameters to this method: the first is an integer array, and the second parameter is a single integer.

This method counts the number of occurrences of the given integer (second) parameter within the array of integers. This integer count is the return value. For example, if the array contains four integers: 23, 31, 17, 23, and the second parameter is the value 23, then the value returned would be 2, as 23 occurs twice within that array. However, if the second parameter is the value 42, the value returned would be zero, as the array does not contain the integer 42.

Complete the following file:

ArrayOps.java

public class ArrayOps { /** This method goes through the array of integers identified by the first parameter, while counting the number of occurrences of the second parameter, a single integer, within the array. @param theArray, an array of integers @param theChar, an integer whose occurrences within the array need to be counted @ return, the count of the occurrences of the integer represented by the second parameter in the array of integers. */ public static int countOccurs(int[] theArray, int theInt) { int count = 0; // loop though theArray, counting occurrences of theInt // your work here // return count of occurrences // your work here } }