public int StrToInt(String _str) {
if (_str.equals("null") || _str == null)
return 0;
java.lang.Integer _intValue = new java.lang.Integer(_str);
return _intValue.intValue();
}
if (_str.equals("null") || _str == null)
return 0;
java.lang.Integer _intValue = new java.lang.Integer(_str);
return _intValue.intValue();
}
toString()字符串到整型
Integer.parseInt()
int i = Integer.parseInt(str);
int a=Integer.parseInt("25");
整型到字符串:
String str=String.valueOf(25);
String str=Integer(25).toString();