How To Multiply Two Numbers Without Using Operator * In Java?

2

2 Answers

Anonymous Profile
Anonymous answered
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
Anonymous Profile
Anonymous answered
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));
}
}

Answer Question

Anonymous