题解 | #图片整理#
图片整理
https://www.nowcoder.com/practice/2de4127fda5e46858aa85d254af43941
import java.util.*; public class Main { public static void main(String[] args) { Scanner fzhinput = new Scanner(System.in); String zfc = fzhinput.nextLine(); StringBuilder stack = new StringBuilder(); List<String> zm=new ArrayList<>(); for(int i=0;i<zfc.length();i++){ char c = zfc.charAt(i); zm.add(Character.toString(c)); } Collections.sort(zm); for(int i=0;i<zm.size();i++){ stack.append(zm.get(i)); } System.out.print(stack.toString()); } }