largeQ
import java.util.Scanner;public class Add{ public static void mian(String[] args) { System.out.println("请输入被加数a:"); Scanner scanner1 = new Scanner(System.in); int num1 = scanner1.nextInt(); System.out.println("请输入被加数b"); Scanner scanner2 = new Scanner(System.in); int num2 = scanner2.nextInt(); int sum = add(num1,num2); System.out.println("a + b = " + sum); } static int add(int a, int b) { return a+b; }}