How to use BigInteger class in Java

1 Answer

0 votes
import java.math.BigInteger;

public class MyClass {
    public static void main(String args[]) {
        BigInteger a = new BigInteger("89370273867254003");
        BigInteger b = new BigInteger("3");
        BigInteger result = a.multiply(b); 
        
        System.out.println(result);
    }
}


/*

run:

268110821601762009

*/

 



answered Jul 25, 2019 by avibootz
...