there are only two differences between factorial(and triangle(firstfactorial(uses instead of in the expression factorial( - secondthe base condition occurs when is not here' some sample interaction when this method is used in program similar to triangle javaenter number factorial = figure shows how the various incarnations of factorial(call themselves when initially entered with = called with = version = version = version = version = version = return multiply by return multiply by return multiply by return multiply by return returns figure the recursive factorial(method calculating factorials is the classic demonstration of recursionalthough factorials aren' as easy to visualize as triangular numbers