// 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) 
public class RadixFun {
    public static String enc(String s) {
        return Integer.toString(Integer.parseInt(s, 10), 36);
    }
    public static String dec(String s) {
        return Integer.toString(Integer.parseInt(s, 36), 10);
    }
    public static void main(String[] args) {
        String s1 = "123456789";
        String s2 = enc(s1);
        String s3 = dec(s2);
        System.out.println(s1);
        System.out.println(s2);
        System.out.println(s3);
    }

}
