What is wrong with this code

what is wrong with this code of binary search however it is same code for binary search which i learned in java crux online course.Please help it prints every time -1