Nomura interview question

Java program for counting occurance of element in array