Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Arrays;
- public class StringSort {
- public static void main(String[] args) {
- String[] words = { "dictionary", "next" };
- for (String s: words) {
- char[] cs = s.toCharArray();
- Arrays.sort(cs);
- System.out.println(cs);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement