public class Test {
/**
* @Description: 字符排序
* @param
* @return void
* @throws
*/
public static void main(String[] args) {
String tmp = "1asdfas2323dfa348edadssdf";
byte[] byteArray = tmp.getBytes();
java.util.Arrays.sort(byteArray);
for (byte b : byteArray) {
System.out.println(b);
}
String last = new String(byteArray);
System.out.println(last);
}
}
转载于:https://my.oschina.net/ydsakyclguozi/blog/423400