I have this code:
public class RecurLoopTest {
public static void main(String[] args) {
printit(2);
}
private static int printit(int n){
if(n>0){
printit(--n);
}
System.out.print(n+",");
return n;
}
}
I have drawn a execution flow/memory flow diagram for above program. Is this diagram correct or do I need some changes to make it correct?
What I have drawn looks like this: