title: How can i handle negative value in reverse order in big decimal in java?
body: <p>I have one problem in <code>BigDecimal</code> with handling negative value in reverse order. I got a <code>NumberFormatException</code>. How can I solve it?</p>
  
  <p>This is my code:</p>
  
  <pre><code>import java.math.BigDecimal;
  
  public class Java_bigdecimal_signum {
      public static void main(String args[]) {
  
          BigDecimal obj = new BigDecimal("20.15-");
          int i = obj.signum();
          System.out.println("\nobject value : " + obj
                           + "\nmethod generated value : " + i);
      }
  }
  </code></pre>
  
  <p>Exception is:</p>
  
  <pre><code>Exception in thread "main" java.lang.NumberFormatException
  at java.math.BigDecimal.&lt;init&gt;(Unknown Source)
  at java.math.BigDecimal.&lt;init&gt;(Unknown Source)
  at Java_bigdecimal_signum.main(Java_bigdecimal_signum.java:6)
  </code></pre>
  
  <p>I need output below:</p>
  
  <pre><code>object value : -20.15
  method generated value : -1
  </code></pre>
  
  <p>Thanks in Advance.</p>