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