public class Computer{
public int sum(int a,int b){
int sum = a + b;
return sum;
}
public int minus(int a,int b){
int minus = a - b;
return minus;
}
}
public class TestComputer{
public static void main(String[] args){
Computer c = new Computer();
int sum = c.sum(12,2);
int minus = c.minus(1,4);
System.out.println(sum);
System.out.println(minus);
}
}
哪有疑问