• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Arrays class

 
Abhi vijay
Ranch Hand
Posts: 509
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Can anyone tell me why I am not able to compile this program?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which error do you have ?
 
Abhi vijay
Ranch Hand
Posts: 509
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java:9: cannot find symbol
symbol : method sort(java.lang.String[])
location: class Arrays
Arrays.sort(s);
^
1 error

Tool completed with exit code 1
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You created your own class named "Arrays" at some point. Find it, delete it. Use the Windows Search tool if you need to.
 
Abhi vijay
Ranch Hand
Posts: 509
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a ton!!
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or use java.util.Arrays.sort(s); instead. But you should definitely find the other Arrays class and rename it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic