Consider the following Java methods.
int func2(int w) {
return w * 3;
}
int func1 (int a, int b) {
int n = a + b;
return 2 + func2(n);
}
int start() {
int z = 4;
return func1(z, 1) - 3;
}
What is the return value of the call start()?
Answers
Answered by
3
Answer:
14
Explanation:
func1(4, 1) -3; [ =>func1(4,1)=2+func2(n); n=4+1]
2+ func2(5) - 3; [ => func2(5) = 5*3 =15 ]
2 + 15 - 3
=14
Similar questions