b.add(c).multiply(a).add(d)
If the variables were int this would be
(b+c)*a + d
divide()
divide() works as expected. Look out for division by zero.
public BigInteger divide( BigInteger val )
Integer divide theBigIntegerthat contains the method byval. The result is returned in a newBigInteger. Ifvalis zero, throw anArithmeticException.
BigInteger a = new BigInteger( "36" ); BigInteger b = new BigInteger( "10" ); BigInteger c = new BigInteger( "6" ); BigInteger z = BigInteger.ZERO;
What is the result of each of the following?