You can simply add the first number for the second number of times.

Suppose you want to execute X * Y, then

add X for Y number of times

Suppose you want to execute X * Y, then

add X for Y number of times

Suppose you want to execute X * Y, then

add X for Y number of times

Import java.math.BigInteger;

public class MultiplyTest {

public static void main(String[] args) {

BigInteger bigInt1 = new BigInteger("5");

BigInteger bigInt2 = new BigInteger("8");

System.out.println(bigInt1.multiply(bigInt2));

}

}

public class MultiplyTest {

public static void main(String[] args) {

BigInteger bigInt1 = new BigInteger("5");

BigInteger bigInt2 = new BigInteger("8");

System.out.println(bigInt1.multiply(bigInt2));

}

}

Didn't find the answer you were looking for?