Tech Mahindra interview question

Implement binary search in java