title: How do I convert a string number value with a dollar sign to BigDecimal in java?
body: <p>I have a dollar amount in a String format.  For example: String salePrice = $348.00.</p>
  
  <p>However, I want to convert this String value to a BigDecimal value, but it has a dollar sign in the string. I tried the code below but it isn't working.</p>
  
  <pre><code>BigDecimal sPrice = new BigDecimal(salePrice);
  </code></pre>
  
  <p>I ended up getting this exception below:</p>
  
  <pre><code>java.lang.NumberFormatException
      at java.math.BigDecimal.&lt;init&gt;(Unknown Source)
      at java.math.BigDecimal.&lt;init&gt;(Unknown Source)
  </code></pre>