Java 进制转换

1 //十转二
2 Integer.toBinaryString(int i);
3 //十转八
4 Integer.toOctalString(int i);
5 //十转十六
6 Integer.toHexString(int i);
7
8
9
10//二转十
11Integer.valueOf("1010",2).toString();
12//八转十
13Integer.valueOf("8765",8).toString();
14//十六转十
15Integer.valueOf("FFFF",16).toString();
原文地址:https://www.cnblogs.com/izxcheng/p/3322565.html