Returns the index of the first appearance of the value target in array. @param array an array of int values, possibly empty @param target a primitive int value @return the least index i for which array[i] == target, or -1 if no such index
(int[] array, int target)
| 150 | * such index exists. |
| 151 | */ |
| 152 | public static int indexOf(int[] array, int target) { |
| 153 | return indexOf(array, target, 0, array.length); |
| 154 | } |
| 155 | |
| 156 | // TODO(kevinb): consider making this public |
| 157 | private static int indexOf(int[] array, int target, int start, int end) { |
no test coverage detected