public static long factorial(int max) {

long factorial = 0;

for (int i = 2; i <= max; i++) {

if( i <= 1 ) // base case

return 1;

else

return i * factorial( i - 1 );

System.out.println("Factorial " + i + " value " + i);

}

return factorial;

}

Help meee:( im trying to print out the factorial for max. I know how the factorial process works, but i dont get how this works.

thanks a whole bunch.