import java.util.Arrays at the top and use Arrays.binarySearch(...) here