[java] Is there a method that calculates a factorial in Java?