Constants for One, Ten and Zero

TypeFieldSummary
static BigDecimalONEThe value 1, with a scale of 0.
static BigDecimalTENThe value 10, with a scale of 0.
static BigDecimalZEROThe value 0, with a scale of 0.

import java.math.BigDecimal;

public class Main {
 
    public static void main(String[] args) {
        System.out.println(BigDecimal.ONE);
        System.out.println(BigDecimal.TEN);
        System.out.println(BigDecimal.ZERO);
        
    }
}

The output:


1
10
0
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.