Question: Consider the following Java method: public static int recurMystery2(int i) { if (i > 0) return 1 + recurMystery2(i/2); return 0; } What will the
Consider the following Java method:
public static int recurMystery2(int i) { if (i > 0) return 1 + recurMystery2(i/2); return 0; } What will the following code print when run?
System.out.println(recurMystery2(10));
| 5 |
| 4 |
| 3 |
| 1 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
