public static void main (String[] args) { System.out.println(factorial(5)); } public int factorial(int n) { if(n <= 1){ return 1; } else{
....then 3 * (3-1)..... until it gets to 1 which will just return 1 right?
right, but it returns that '1' to the next-to-last invocation, which will multiply by two, returning '2'... to the next-to-next-to-last, which will multiply by three.....