字符串、数值----转换

字符串型转换成各种数字类型:   
String s = "169";  
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 s = String.valueOf( value); // 其中 value 为任意一种数字类型。

  

原文地址:https://www.cnblogs.com/ipetergo/p/6236392.html