zoukankan      html  css  js  c++  java
  • BigInteger类&BigDecimal类

    BigInteger类的数字范围较Integer类的数字范围大得多,可以支持任意精度的整数。

    构造器:

    》BigInteger(String val)

    常用方法:

    》public BiInteger abs()

    public BiInteger  add(BigInteger val)

    public BiInteger subtrat(BigInteger val)

    public BiInteger multply(BigInteger val)

    public BiInteger divide(BigInteger val)

    public BiInteger remeber(BigInteger val)

    public BiInteger pow(int exponent)

    public BiInteger divide AndRemainder(BigInteger val)

    BigDecimal类支持任何精度的定点数

    构造器:

    》public BigDecimal(double val)

    》public BigDecimal(String val)

    常用方法:

    》public BigDecimal add(BigDecimal augend)

    》public BigDecimal subtract(BigDecimal subtrahend)

    》public BigDecimal multiply(BigDecimal multiplicand)

    》public BigDecimal divide(BigDecimal divisor,int scale,int roundingMode)

  • 相关阅读:
    HTML和CSS 基本要点必看
    CSS
    六个选择器
    HTML初级课程 (自学可懂)
    this
    1.作用域链
    js if 语句
    js数据类型
    ifelse语句
    三元运算符
  • 原文地址:https://www.cnblogs.com/yangHS/p/10698635.html
Copyright © 2011-2022 走看看