Online Java Compiler By
JavaTpoint.com
import java.math.BigDecimal; public class BigDecimalMultiplyExample3 { public static void main(String[] args) { // Creating BigDecimal objects BigDecimal bdValue_1, bdValue_2, multiplyresult; //Assigning value into BigDecimal objects bdValue_1= new BigDecimal("-120"); bdValue_2= new BigDecimal("-35"); // it returns multiplication result as BigDecimal value multiplyresult = bdValue_1.multiply(bdValue_2); // Displaying result of multiplication System.out.println("Multiplication of "+bdValue_1+" and "+bdValue_2+" is = " + multiplyresult); } }
Output