1. The values that r takes are:
6
8
7
18
12
16
14
24
2. private int addUp(int a, int b) {
return a + b;
}
private int addUp(int a, int b, int c) {
return a + b + c;
You might call the above by:
public void actionPerformed(ActionEvent event) {
int sum2, sum3;
int x = 22, y = 87, z = 42;
sum2 = addUp(x,y);
sum3 = addUp(x, y, z);
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here