| Author |
Compile error
|
Jacob Michaels
Ranch Hand
Joined: Mar 23, 2003
Posts: 35
|
|
I can't seem to figure out why this code won't compile. I keep getting this error message: Sort.java:22: cannot resolve symbol symbol : method sort (java.lang.String[]) location: class Arrays Arrays.sort(s); ^ 1 error I have j2sdk 1.4.1.02 installed Thank you for any responses. import java.util.*; public class Sort { public static void main(String argv[]) { Sort s = new Sort(); } Sort() { String s[] = new String[4]; s[0]="z"; s[1]="b"; s[2]="c"; s[3]="a"; Arrays.sort(s); for(int i=0;i< s.length;i++) System.out.println(s[i]); } }
|
 |
Michael Morris
Ranch Hand
Joined: Jan 30, 2002
Posts: 3451
|
|
Hi Jacob, Gee dude, it compiles and runs fine on my machine. What OS are you using? Michael Morris
|
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
|
 |
Jacob Michaels
Ranch Hand
Joined: Mar 23, 2003
Posts: 35
|
|
I am using XP Home I am also using TextPad editor. Just for grins, I typed the command in the command prompt and it compiled and ran fine; maybe I need to see if I have the lastest version of TextPad. Thank you!! [ March 29, 2003: Message edited by: Jacob Michaels ]
|
 |
Michael Morris
Ranch Hand
Joined: Jan 30, 2002
Posts: 3451
|
|
Hi Jacob, I use TextPad also. It's as close to an IDE as an old fart like me is going to get. You can check the command for compile Java with Configure->Preferences. When the dialog comes up, click the + on Tools and highlight Compile Java, you can fully qualify the compiler path, add command line parameters, etc. Michael Morris
|
 |
 |
|
|
subject: Compile error
|
|
|