Online Java Compiler By
JavaTpoint.com
import java.math.BigInteger; public class BigIntegerPowExample2 { public static void main(String[] args) { //create 2 BigInteger objects BigInteger big1,result; // initialize all BigInteger objects big1 = new BigInteger("100"); int exponent = 3; //perform pow operation on big1 using exponent result = big1.pow(exponent); String str=big1+"^"+exponent+" is "+result; System.out.println(str); } }
Output