What will the following program display?
public class ReviewQuestion5
{
public static void main(String[] args)
int x = 10;
System.out.println(myMethod(x));
}
public static int myMethod(int num)
if (num
return 0;
else
return myMethod(num - 1) + num;
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here