将十进制数转为2进制字符串
String s = Integer.toBinaryString(6); System.out.println(s);//110
将十进制数转为任意进制字符串
String s = Integer.toString(6,2); System.out.println(s);//110
将任意进制数字符串转为10进制整数
Integer x = Integer.parseInt("101", 2); System.out.println(x);//5
String s = Integer.toBinaryString(6); System.out.println(s);//110
String s = Integer.toString(6,2); System.out.println(s);//110
Integer x = Integer.parseInt("101", 2); System.out.println(x);//5