Question: What will be following program display? package javaapplication 4 0 5 ; public class JavaApplication 4 0 5 { public static void main ( String
What will be following program display? package javaapplication ;
public class JavaApplication
public static void mainString args
int ;
System.out.printlnmyMethodx;
public static int myMethod int num
if num
return
else
return myMethodnum num;
output:
Shows the recursive step, base step and the return values.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
