What is the output of the following Java program?
1 2 3 4 5 6 7 8 |
|
Select one:
- a. 100
- b. 9
- c. 10
- d. 0
- e. 45
The "add" method increments the parameter "i", which is a copy of the argument "sum". The value of "sum" never changes. The correct answer is: 0