Online Java Compiler By
JavaTpoint.com
import java.math.BigInteger; public class BigIntegerAddExample { public static void main(String[] args){ BigInteger big1, big2, big3; // create 3 BigInteger objects big1=new BigInteger ("10000000000000000"); //assign value to big1 big2=new BigInteger ("1");//assign value to big2 big3=big1.add (big2); // perform add operation on big1 using big2 String str= "Result of addition is" + big3; System.out.println(str); //print big3 value }
Output