代碼示例:
int?a?=?32;
System.out.println("二進(jìn)制:?"+Integer.toBinaryString(a));
System.out.println("十六進(jìn)制:?"+Integer.toHexString(a));
System.out.println("八進(jìn)制:?"+Integer.toOctalString(a));
System.out.println("十二進(jìn)制:?"+Integer.toString(month,?12));
String?s="66";
System.out.println(Integer.toString(Integer.parseInt(s,12),?6));