Skip to content

Commit fed1802

Browse files
authored
Create AlphabetSoup.java
1 parent fb4f8a2 commit fed1802

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Easy/AlphabetSoup.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import java.util.*;
2+
import java.io.*;
3+
4+
class Main {
5+
6+
public static String AlphabetSoup(String str) {
7+
// code goes here
8+
String newstr="";
9+
String [] kelime = str.split("");
10+
11+
Arrays.sort(kelime);
12+
13+
for( String k : kelime){
14+
15+
newstr += k;
16+
17+
}
18+
19+
return newstr;
20+
}
21+
22+
public static void main (String[] args) {
23+
// keep this function call here
24+
Scanner s = new Scanner(System.in);
25+
System.out.print(AlphabetSoup(s.nextLine()));
26+
}
27+
28+
}

0 commit comments

Comments
 (0)