File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes doubt in generics- K&B book Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "doubt in generics- K&B book " Watch "doubt in generics- K&B book " New topic

doubt in generics- K&B book

aslika bahini
Ranch Hand

Joined: Mar 03, 2007
Posts: 111

How this works?

Given a properly prepared String array containing five elements, which
range of results could a proper invocation of Arrays.binarySearch()
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

Answer: G, may i know what is inverted and then decremented.(as it was
explained in the answers part of self test)


dolly shah
Ranch Hand

Joined: Jun 18, 2007
Posts: 383
I think below link will clear your doubt. Refer it.


SCJP-1.5<br />SCWCD-1.4
I agree. Here's the link:
subject: doubt in generics- K&B book
It's not a secret anymore!