String s = "16";
String _hex = Integer.toHexString(Integer.parseInt(s));//转16进制
System.out.println("转16进制为:" + _hex);
?
String s1 = "6A";
int _oct = Integer.parseInt(s1, 16);//转十进制
System.out.println("转10进制为:" + String.valueOf(_oct));
String _hex = Integer.toHexString(Integer.parseInt(s));//转16进制
System.out.println("转16进制为:" + _hex);
?
String s1 = "6A";
int _oct = Integer.parseInt(s1, 16);//转十进制
System.out.println("转10进制为:" + String.valueOf(_oct));