Given a properly prepared
String array containing five elements, which range of results could a proper invocation of Arrays.binarySearch()produce?
a. 0 through 4
b. 0 through 5
c. -1 through 4
d. -1 through 5
e. -5 through 4
f. -5 through 5
g. -6 through 4
h. -6 through 5
ans is G.
i thought answer is be E
range can be ((-5) -1) through 4 i.e. 4 to 4
negative result give insertion point(array index).
please confirm.