• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt in generics- K&B book

 
aslika bahini
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 383
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think below link will clear your doubt. Refer it.

here
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic