Question: Write a recursive and non-recursive method to calculate factorials. Your method should have the following method header: public static int factorial(int n) Note: Do NOT
Write a recursive and non-recursive method to calculate factorials.
Your method should have the following method header: public static int factorial(int n)
Note: Do NOT write a main method or any code using the method you write just write the method itself. Your method should not print anything. You may assume that input n > 0.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
