import java.util.Scanner;放在所有类的开头
class aaa{
/*public int aaa(int a,int b){
return a+b; }
*/
public int a;
public int b;
public int getA(){
return a;
}
public int getB(){
return b;
}
public void setA(int a){
this.a=a;
}
public void setB(int b){
this.b=b;
}
public int sum(){
return a+b; }
}
class add{
public static void main(String [] args){
Scanner sc=new Scanner(System.in);
System.out.println("请输入a的值");
int a=sc.nextInt();
System.out.println("请输入b的值");
int b=sc.nextInt();
System.out.println("-------------");
aaa s=new aaa();
s.setA(a);
s.setB(b);
System.out.println(s.sum());
}
}