Here you can find the source of factorial(final int a)
public static int factorial(final int a)
//package com.java2s; //License from project: Open Source License public class Main { public static int factorial(final int a) { int factorialVal = 1; for (int i = 2; i <= a; i++) { factorialVal = factorialVal * i; }/*from w w w . ja v a2 s . c o m*/ return factorialVal; } }