1、从String转换到Double
Double input1 = new Double("56.88");
Double input2 = Double.valueOf("56.88");
Double input3 = Double.parseDouble("56.88");
可以用try catch 捕获异常(NumberFormatException),如果字符串不是有效的Double类型
2、String 转Boolean
Boolean b1 = Boolean.valueOf("false");
3、 Boolean转String
Boolean b1 = new Boolean("false");
String str = Boolean.toString(b1);
4、Double转String
double input = 25.01;
String output = Double.toString(input);
5、String转Long
Long long1 = new Long("75");
String str = "79";
Long long2 = Long.valueOf(str);