What is the output of the following code?
public class Question4
{
public static void main(String[] args)
System.out.println(getMysteryValue(3));
}
public static int getMysteryValue(int n)
if (n
return 1;
else
return getMysteryValue(n - 1) + n;
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here