Consider the following function:
public void dosomething (int n) {
if (n > 0) {
System.out.print(n);
dosomething(n - 1);
}
}
What will be printed when dosomething(5) is called?
(Either write a sequence of numbers, or write "infinite
recursion".)
54321
The print command will be executed before the recursive call, each time until it reaches the base case.