title: How to multiply a BigDecimal by an integer in Java
body: <p>How do you multiply a BigDecimal by an integer in Java? I tried this but its not correct.</p>
  
  <pre><code>import java.math.BigDecimal;
  import java.math.MathContext;
  
  public class Payment {
      int itemCost;
      int totalCost = 0;
  
      public BigDecimal calculateCost(int itemQuantity,BigDecimal itemPrice){
          itemCost = itemPrice.multiply(itemQuantity);
          totalCost = totalCost + itemCost;
      return totalCost;
     }
  </code></pre>