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 <= 0)return 0;elsereturn myMethod(num - 1) + num;}}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.