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]);
}
}