解题思路:直接比较字符的ascii码大小。
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
char a,b,c;
Scanner in=new Scanner(System.in);
while(in.hasNext()){
String str=in.nextLine();
a=str.charAt(0);
b=str.charAt(1);
c=str.charAt(2);
char t;
if(a<b)
{
t=a;a=b;b=t;
}
if(a<c)
{
t=a;a=c;c=t;
}
if(b<c){
t=b;b=c;c=t;
}
System.out.println(c+" "+b+" "+a);
}
in.close();
}
}