| 1. | What will be the output of the program? class Test void start() void twice(int x) |
|||||||
Answer: Option B Explanation: The int x in the twice() method is not the same int x as in the start() method. Start()'s x is not affected by the twice() method. The instance variable s is updated by twice()'s x, which is 14. |
