Geekific
What will be the output of the following code?--------------------public static void main(String[] args) { System.out.println(myMethod(6));} public static int myMethod(int n) { if (n <= 1) return n; return myMethod(n - 2) + myMethod(n - 3);}
1 week ago | [YT] | 5
Geekific
What will be the output of the following code?
--------------------
public static void main(String[] args) {
System.out.println(myMethod(6));
}
public static int myMethod(int n) {
if (n <= 1) return n;
return myMethod(n - 2) + myMethod(n - 3);
}
1 week ago | [YT] | 5