title: Error With Big Decimal in Java
body: <p>I keep getting the </p>
  
  <blockquote>
    <p>The method add(BigDecimal) in the type BigDecimal is not applicable for the arguments (pay)"</p>
  </blockquote>
  
  <p>error with the code below.</p>
  
  <p>For reference I have saved the <code>pay</code> class in a separate file, where I import <code>BigDecimal</code> as well. </p>
  
  <p>Would one of you like to point out where I'm lacking/misunderstanding? I've tried to find a solution, but I couldn't find something.</p>
  
  <pre><code>import java.util.Scanner;
  import java.math.BigDecimal;
  
  class SalesPreInt { 
      public static void main(String[] args) {
          Pay pay = new Pay();
          pay.basePay();
  
          BigDecimal intCalc = new BigDecimal("0.15");
  
          Scanner userInput = new Scanner(System.in);
  
          System.out.println("What were your total sales?");
          BigDecimal salesPre = userInput.nextBigDecimal();
          System.out.println("You're Total Sales were "+salesPre);
  
          userInput.close();
  
          BigDecimal postIntCalc = salesPre.multiply(intCalc);
          BigDecimal salesCom = postIntCalc.add(salesPre);
          int finalCalc = salesCom.add(pay);
  
          System.out.println("Your total sales including commission is "+salesCom);
          System.out.println("Your total pay is"+finalCalc);
      }   
  }
  </code></pre>
  
  <p>pay.java file below:</p>
  
  <pre><code>import java.math.BigDecimal;
  
  public class Pay {
      public void basePay() {
          int basePay = 50000;
          BigDecimal bd = new BigDecimal(String.valueOf(basePay));
      }
  }
  </code></pre>