In Java, the factorial of large numbers can be easily implemented in SE6 using the bigInteger class. The logic is the same as for finding factorials. The code goes as follows ::
import java.math.BigInteger;
import java.lang.*;
import java.util.Scanner;
class largenumber
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
System.out.println("Enter a number for factorial");
int num=in.nextInt();
BigInteger fact=BigInteger.valueOf(1);
for(int i=2;i<=num;i++)
{
fact=fact.multiply(BigInteger.valueOf(i));
}
System.out.println("Factorial "+num+" is ::nt"+fact);
}
}
