https://www.acmicpc.net/problem/1427
📌 Problem
📝 Solution
package Study0306;
import java.util.Arrays;
import java.util.Scanner;
public class sort {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
String n = sc.nextLine();
char[] ch = new char[n.length()];
for(int i=0; i<ch.length;i++) {
ch[i]=n.charAt(i);
}
Arrays.sort(ch);
for(int i=ch.length-1;i>=0;i--) {
System.out.print(ch[i]);
}
}
}