10转2 10转8 10转16
public class Main {
public static void main(String[] args) {
int n = 1024;
Integer.toHexString(n);
System.out.println(n + "的二进制是:" + Integer.toBinaryString(n));
System.out.println(n + "的八进制是:" + Integer.toOctalString(n));
System.out.println(n + "的十六进制是:" + Integer.toHexString(n));
}
}