

InterviewSolution
Saved Bookmarks
1. |
The following is a part of some class. What will be the output of the function mymethod( ) when the value of the counter is equal to 3? Show the dry run/working.void mymethod (int counter){ if (counter == 0) System.out. println(” "); else { System.out.println ("Hello" +counter); mymethod (--counter); System.out.println (" " +counter); } } |
||||||||
Answer»
|
|||||||||