字符串转换为基本数据类型
Integer.parseInt();
基本数据类型转为字符串
String.valueOf(123);
实例代码:
String s = "1234"; System.out.println(Integer.parseInt(s));//1234
System.out.println(Double.parseDouble("123.54"));//123.54
System.out.println(String.valueOf(134.3452));//134134.3452
标签:转换,String,数据类型,System,println,字符串,out From: https://www.cnblogs.com/cn-iwish/p/17180831.html