How to code binary search in Java? I want to search a number in an array.