Hello, here is a question 9 on from pg 616 of Bates and Sierra's
SCJP Java 5 study guide:
Given a properly prepared
String array containing five elements, which range of results coud a proper invocaion of Arrays.binarySearch() produce?
The answer given on page 628 is:
G: -6 through 4
I would think the answer should be:
E: -5 through 4
Isn't the formula for determining the
insertion point:
So for an array of 5 elements, the insertion point representing index 4 is:
Am I missing something?
Tim