Online Java Compiler By
JavaTpoint.com
import java.math.BigDecimal; public class BigDecimalMultiplyExample1 { public static void main(String[] args) { // Creating BigDecimal objects BigDecimal bdValue_1, bdValue_2, multiplyresult; //Assigning value into BigDecimal objects bdValue_1= new BigDecimal("34.203"); bdValue_2= new BigDecimal("44.25"); // 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