• Post Reply Bookmark Topic Watch Topic
  • New Topic

binarySearch() for Arrays class is generating error code in scjp6 book  RSS feed

 
Ranch Hand
Posts: 1078
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
binarySearch() for Arrays class is generating error code in scjp6 book and i typed the same code then also i am getting bunch of errors below is the code


and below is the error message i get


why am i gettting the error i have imported java.util.* ???
 
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure you ran the same class? I got only one error - symbol not found 'rs' and swapping these two lines fixed it.
 
Vishal Hegde
Ranch Hand
Posts: 1078
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still getting the same 5 errors
 
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is probably because you have an Arrays class of your own in the same directory. Try using the fully-qualified name java.util.Arrays instead of Arrays throughout.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!