BigDecimal: min(BigDecimal val) : BigDecimal « java.math « Java by API






BigDecimal: min(BigDecimal val)

  
/*
3419229223372036854775809.23343
3419229223372036854775805.23343
1709614611686018427387903.616715
false
3419229223372036854775807.23343
3419229223372036854775807.23343
2.0
1.23343
*/
import java.math.BigDecimal;

public class MainClass {

  public static void main(String argv[]) {
    BigDecimal first = new BigDecimal("3419229223372036854775807.23343");
    BigDecimal second = new BigDecimal("2.0");
    System.out.println(first.add(second));
    System.out.println(first.subtract(second));
    System.out.println(first.divide(second));
    System.out.println(first.equals(second));
    System.out.println(first.abs());
    System.out.println(first.max(second));
    System.out.println(first.min(second));
    System.out.println(first.remainder(second));
  }
}

           
         
    
  








Related examples in the same category

1.BigDecimal.ROUND_DOWN
2.BigDecimal.ROUND_HALF_DOWN
3.BigDecimal.ROUND_HALF_UP
4.BigDecimal.ROUND_UP
5.new BigDecimal(String val)
6.BigDecimal: abs()
7.BigDecimal: add(BigDecimal augend)
8.BigDecimal: doubleValue()
9.BigDecimal: divide(BigDecimal divisor)
10.BigDecimal: divide(BigDecimal divisor, int roundingMode)
11.BigDecimal: equals(Object x)
12.BigDecimal: max(BigDecimal val)
13.BigDecimal: multiply(BigDecimal multiplicand)
14.BigDecimal: negate()
15.BigDecimal: pow(int n)
16.BigDecimal: remainder(BigDecimal divisor)
17.BigDecimal: setScale(int newScale, int roundingMode)
18.BigDecimal: subtract(BigDecimal subtrahend)
19.BigDecimal: valueOf(long val)