Code example for BigInteger

Methods: add

import java.math.BigInteger; 
public class euler20 
	static BigInteger ONE = BigInteger.ONE;
	static BigInteger TWO = ONE.add(ONE);
	public static void main(String[] args)
		//first find 100! 
		BigInteger fact = new BigInteger("100");
		BigInteger i = new BigInteger("99");
		for(; i.compareTo(TWO) >= 0; i=i.subtract(ONE))
			fact = fact.multiply(i);
		//convert it to a string 
		String str = fact.toString();
Connect your IDE to all the code out there  Get Codota for Java