Here you can find the source of arraySearch(int[] arr, int i)
static int arraySearch(int[] arr, int i)
//package com.java2s; //License from project: Open Source License public class Main { static int arraySearch(int[] arr, int i) { for (int j = 0; j < arr.length; j++) { if (arr[j] == i) return j; }/*from www. ja va 2 s .c om*/ return -1; } static int arraySearch(Object[] arr, Object obj) { for (int j = 0; j < arr.length; j++) { if (arr[j].equals(obj)) return j; } return -1; } }