我写的是两个整形数的相加import java.util.Scanner;class Jusuan{public static void main(String[] args) { int sum=0; Scanner s=new Scanner(System.in); int a=Integer.parseInt(s.next()); int b=Integer.parseInt(s.next()); sum=a+b; System.out.println(sum); } }希望对你有帮助!