Question: 21
(Choose 1 answer)
Consider the following function:
void fun(int n)
{if (n == 0)
System.out.println("Hello");
else
{for(int i = 1; i < n; i++)
System.out.print("$");
System.out.println();
fun(n - 1);
What is the output when the statement fun(3); is run?
A. Hello
$$$
$$
B. $
$$
2221
$$$
Hello
C. $$$
$$
$
Hello
D. Hello
$
$$
$$$