https://jakerpomperada.com/factorial-program-in-java-with-error-handling/