BigDecimal greater than Zero - Java java.math

Java examples for java.math:BigDecimal Compare

Description

BigDecimal greater than Zero

Demo Code


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

public class Main {
    public static void main(String[] argv) throws Exception {
        BigDecimal that = new BigDecimal("1234");
        System.out.println(geZero(that));
    }//  ww w .ja  v a 2s  .  co m

    public static boolean geZero(final BigDecimal that) {
        return BigDecimal.ZERO.compareTo(that) <= 0;
    }
}

Related Tutorials