java如何将“abcd1234”转换为INT1234
public class testcount {
public static void main(String[] args) {
int c;
String test = "ABCD1234";
}
}
我如何从String test
转换到int c
,答案是1234
你可以在下面搜索框中键入要查询的问题!
public class testcount {
public static void main(String[] args) {
int c;
String test = "ABCD1234";
}
}
我如何从String test
转换到int c
,答案是1234
# 1 楼答案
使用
int c = Integer.parseInt(str);
将int转换为字符串