Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java array get index

 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;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #array #index
ADD COMMENT
Topic
Name
4+3 =