// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.Arrays;

public class CharSort {
    public static void main(String[] args) {
        String s = "a2c1b";
        char[] ca = s.toCharArray();
        Arrays.sort(ca);
        String s2 = new String(ca);
        System.out.println(s2);
    }
}
