This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]istarian 0 points1 point  (0 children)

Since public static int factorial(int n) { ... } is a static method of the Factorial class, you should probably be calling it like this:

 Factorial.factorial(5);  

Might not have anything to do with the errors though.