wood burning stoves 2.0*
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: doubt in generics- K&B book
Similar Threads
Chap 7 pg 628 from kathy & Sierra
binary search
K&B Book Chapter 7,Page 616,Question 9
Question about binarySearch() at K&B5 book
K&B page 628 question 9