Skip to content

Instantly share code, notes, and snippets.

@tonkatsu7
Created July 12, 2018 14:09
Show Gist options
  • Select an option

  • Save tonkatsu7/04c18bf9d4d0f7972cb74ed676d3fbc5 to your computer and use it in GitHub Desktop.

Select an option

Save tonkatsu7/04c18bf9d4d0f7972cb74ed676d3fbc5 to your computer and use it in GitHub Desktop.
CodeByte challenge Alphabet Soup
import java.util.*;
import java.io.*;
class Main {
public static String AlphabetSoup(String str) {
char[] chars = str.toCharArray();
Arrays.sort(chars);
return new String(chars);
}
public static void main (String[] args) {
// keep this function call here
Scanner s = new Scanner(System.in);
System.out.print(AlphabetSoup(s.nextLine()));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment