Constants for One, Ten and Zero

static BigDecimal ONE
The value 1, with a scale of 0.
static BigDecimal TEN
The value 10, with a scale of 0.
static BigDecimal ZERO
The 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
Home 
  Java Book 
    Essential Classes  

BigDecimal:
  1. BigDecimal class
  2. Constants for One, Ten and Zero
  3. Rounding mode
  4. Create BigDecimals
  5. Methods used to do calculation
  6. Convert BigDecimal to primitive data types
  7. Compare two BigDecimal
  8. Move decimal point
  9. Scale and precision
  10. Convert BigDecimal to String
  11. Remove the trailing zeros
  12. Convert double and long to BigDecimal
  13. Calculating Euler's number e with BigDecimal