String →int:
int i = Integer.parseInt(String str);
String →double:
double d = Double.parseDouble(String str);
int→String:
String str = String.valueOf(int i);
String str = Integer.toString(int i);
String →int:
int i = Integer.parseInt(String str);
String →double:
double d = Double.parseDouble(String str);
int→String:
String str = String.valueOf(int i);
String str = Integer.toString(int i);
本文标题:String转基本数据类型
本文链接:https://www.haomeiwen.com/subject/pscwaxtx.html
网友评论