chrisvmarle
02-13-2004, 07:39 PM
Hi all,
I can use a little help here
I have an array String[] tempnames, wich I want to be sorted alphabeticly not case sensitive.
Here's my current code:
import java.util.Arrays;
public class HelloWorld
{
public static void main (String[] args)
{
String[] tempnames = {"Chris","Remco","admin","moderator"};
Arrays.sort(tempnames);
for(int i=0;i<tempnames.length;i++)
{
System.out.println(tempnames[i]);
}
}
}
Thanks in advance
Greetz, Chris
I can use a little help here
I have an array String[] tempnames, wich I want to be sorted alphabeticly not case sensitive.
Here's my current code:
import java.util.Arrays;
public class HelloWorld
{
public static void main (String[] args)
{
String[] tempnames = {"Chris","Remco","admin","moderator"};
Arrays.sort(tempnames);
for(int i=0;i<tempnames.length;i++)
{
System.out.println(tempnames[i]);
}
}
}
Thanks in advance
Greetz, Chris