In java say, I have:
import java.util.*;
public class HelloWorld {
public static void main(String[] args) {
int[] arr = {1,1};
int index = Arrays.binarySearch(arr, 1);
System.out.println(index);
}
}
This will always give the first index it finds, is there a way I can get the second one?