Nomura Interview Question

Java program for counting occurance of element in array