Consider the following recursive method.
public void recursionEx(int x)
{
if(x != 0)
{
System.out.println(x);
recursionEx(x - 1);
System.out.println(x);
}
}
Trace the execution of the method call recursionEx(3) and complete the table to show the sequence of calls and the values printed to the console.
what would happen if the method was called by recursionEx(-3).
public static void recursionEx(int n) {
if (n < 0) {
System.out.println("Done");
} else {
System.out.println(n);
recursionEx(n - 1);
System.out.println(n);
}
}
Show the output that would be produced when the method is called with recursionEx(-3).


