Can't figure out why my answer is incorrect

I’m following the “pass-the-technical-interview-with-java” path and can’t see why my answer is incorrect.

The question looks like this:


To me the statement I picked seems to be an incorrect statement because ‘right’ value is only set to mid if the target value is less than midValue. If the target value is equal to midValue, mid is returned and the else block won’t be reached.

I would like to know if I’m missing something.

Your analysis looks right to me. There may be a more “correct” answer among the choices, but I agree with you that the answer you selected is an incorrect statement.