//转换成10进制
String s = "8";
byte b = Byte.parseByte( s );
short t = Short.parseShort( s );
int i = Integer.parseInt( s );
long l = Long.parseLong( s );
Float f = Float.parseFloat( s );
Double d = Double.parseDouble( s );
String hex_s = "ff";
//转换成16进制
int hex = Integer.parseInt( hex_s,16 );
数字转字符就不用说了,数字后面加“”就行了。