What will happen when the following recursive method is executedwith an initial input value of 10?public int recursiveMethod(intinput)
{
return recursiveMethod(input – 1);
if (input < 0)
{
return 0;
}
}
It will return a value of 0.
It will return a value of 10.
The method will terminate immediately since there is no basecase.
The method will eventually return an out of stack spaceerror.
Expert Answer
An answer will be send to you shortly. . . . .