I want to find the number of even numbers in an array of integers. so far i wrote this code
public static int EvenNum(int[] arr) {
int index = 0;
if (arr[index] % 2 == 1) {
return 0;
} else if (arr[index] % 2 == 0) {
return 1;
}
index++;
return index + EvenNum(arr);
}
please help me make this code run