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

Java: How to Negate a BigDecimal

Java: How to Negate a BigDecimal

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
  • autobox in java with bigdecimal
  • negating a large number in java
  • BigDecimal negate examples
  • java bigdecimal autobox

No comments yet.

Leave a Comment