
这个不用自己造轮子,有现成的:
System.out.println(Integer.parseInt("a", 16));System.out.println(Integer.toString(114514, 16));System.out.println(new BigInteger("114514").toString(8));System.out.println(new BigInteger("114514").toString(16));

这个不用自己造轮子,有现成的:
System.out.println(Integer.parseInt("a", 16));System.out.println(Integer.toString(114514, 16));System.out.println(new BigInteger("114514").toString(8));System.out.println(new BigInteger("114514").toString(16));