Cognizant interview question

Explain binary search in java