Copy this method into your class
public int getArrayIndex(int[] arr,int value) {
int k=0;
for(int i=0;i<arr.length;i++){
if(arr[i]==value){
k=i;
break;
}
}
return k;
}
Call this method with pass two perameters Array and value and store its return value in a integer variable.
int indexNum = getArrayIndex(array,value);
Thank you