BigDecimal absolute value - Java java.math

Java examples for java.math:BigDecimal Calculation

Description

BigDecimal absolute value

Demo Code


//package com.java2s;
import java.math.BigDecimal;

public class Main {

    public static BigDecimal abs(String strNum) {
        return new BigDecimal(strNum).abs();
    }/*from  ww  w . j a v  a 2  s .  co m*/
}

Related Tutorials