Here are a few links that should help you out:
[url=http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#toCharArray()]java.lang.String.toCharArray()[/url]
[url=http://java.sun.com/j2se/1.5.0/docs/api/java/util/Arrays.html#sort(char[])]java.util.Arrays.sort(char[])[/url]
[url=http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#valueOf(char[])]java.lang.String.valueOf(char[])[/url]
These should cover the three operations you need.
... learn to use the docs. They are invaluable to a java programmer.
- Adam
> ok, ive worked out how to make the char array,
>
> which is the best way to sort the characters in it
> alphanumerically (as noted above)?
>
> Message was edited by:
> ca4mje
try using the resources list above.
if your planning on implementing the sorting procedure yourself, then asking about the best way to do it is opening a real can of worms on this forum. There are hundreds of different sorting algorithms that different programmers will swear by.
If your a beginner, I would suggest a bubble sort. It's probably the best documented algorithm out there, and it's pretty straight forward to understand how it works. However, it is slightly slow, especially if your list is large.
- Adam