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();

 

posted @ 2013-09-15 15:15  istatic  阅读(450)  评论(0编辑  收藏  举报