@Test
public void test1(){
String str1 = "123";
int num = (int)str1;//错误的
int num = Integer.parseInt(str1);
String str2 = String.valueOf(num);//"123"
String str3 = num + "";
System.out.println(str1 == str3);
}
?
原文:https://www.cnblogs.com/leyzzz/p/15306053.html