Question 1 of 5
A kite shop counts letter A on ribbon stamps with this recursive method.
public static int countA(String s)
{
if (s.length() == 0)
{
return 0;
}
int n = 0;
if (s.substring(0, 1).equals("A"))
{
n = 1;
}
return n + countA(s.substring(1));
}
(a) State the return value of countA("CASA"). (b) List the String argument of each call after the original call, in the order the calls are made. (c) Explain what the base case returns and why that case is required.