Programming Tutorials

Comment on Tutorial - Recursion in java By aathishankaran



Comment Added by : vipul

Comment Added at : 2012-08-12 19:41:19

Comment on Tutorial : Recursion in java By aathishankaran
can anyone explain the output of this recursive example???
class a
{
static int c=1;
public static void main(String ar[])
{

recur(4);

}

public static void recur(int n)
{

for(int i=0;i<n;i++)
{

recur(n-1);
System.out.println(c);
c++;

}


}


}


View Tutorial