public class t10 {
public static void main(String[] args) {
// TODO Auto-generated method stub
String str="123456";
long n=Long.parseLong(str);
int n1=Integer.parseInt(str);
System.out.println(n);
System.out.println(n1);
}
}
Long.parseLong(str) Integer.parseInt(str)方法
于 2022-02-25 23:56:50 首次发布