Created
July 12, 2018 14:09
-
-
Save tonkatsu7/04c18bf9d4d0f7972cb74ed676d3fbc5 to your computer and use it in GitHub Desktop.
CodeByte challenge Alphabet Soup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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