Here you can find the source of factorial(int i)
public static int factorial(int i)
//package com.java2s; //License from project: Open Source License public class Main { private static int[] f = { 1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600 }; public static int factorial(int i) { return f[i]; }//w w w . j ava 2 s.co m }