binary search class made in java