String str="1"; String str1="2"; int m=Integer.parseInt(str);//将"1"转换成整型int 1 int n=Integer.parseInt(str1); System.out.println("m+n="+(m+n));