public class test2 {
public static void main(String[] args)throws ParseException {
// TODO Auto-generated method stub
method1();
}
public static void method1(){
Scanner sc=new Scanner(System.in);
System.out.println("输入一个字符串");
String a=sc.next();
System.out.println("再输入一个字符串");
String b=sc.next();
System.out.println("两个字符串相加:"+(a+b));
int a1= Integer.parseInt(a);
int b1= Integer.parseInt(b);
System.out.println("两个数值之和:"+(a1+b1));
}
}
}