Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: How to Negate a BigDecimal

Java: How to Negate a BigDecimal
{filelink=11209}

import java.math.BigDecimal;
public class NegatBigDec
{
  public static void main(String[] argv) throws Exception
  	{
    BigDecimal val = new BigDecimal("642014.23");
    // Add "-"
<span id="more-396"></span>    val = val.negate();
    System.out.println (val);
  }
}

Users who found this page were searching for:

  • bigdecimal negate java
  • negating a large number in java
  • java bigdecimal autobox
  • BigDecimal negate examples
  • autobox in java with bigdecimal

No comments yet.

Leave a Comment