aspose file tools
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
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "doubt in generics- K&B book " Watch "doubt in generics- K&B book " New topic
Author

doubt in generics- K&B book

aslika bahini
Ranch Hand

Joined: Mar 03, 2007
Posts: 111
Hi,



How this works?

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

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


samura


dolly shah
Ranch Hand

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

here


SCJP-1.5<br />SCWCD-1.4
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: doubt in generics- K&B book
 
Similar Threads
K&B Book Chapter 7,Page 616,Question 9
Question about binarySearch() at K&B5 book
binary search
Chap 7 pg 628 from kathy & Sierra
K&B page 628 question 9