Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Section D.7. Package java.math

D.7. Package java.math

D.7.1. Class java.math.BigDecimal

  • BigDecimal (String value)

    This constructs an arbitrary-precision floating-point number from the digits in the given string.

    Parameters: value A string representing the floating-point number

  • BigDecimal add(BigDecimal other)

  • BigDecimal multiply(BigDecimal other)

  • BigDecimal subtract(BigDecimal other)

    These methods return a BigDecimal whose value is the sum, difference, product, or quotient of this number and the other.

    Parameters: other The other number

    Returns: The result of the arithmetic operation

D.7.2. Class java.math.BigInteger

  • BigInteger (String value)

    This constructs an arbitrary-precision integer from the digits in the given string. Parameters: value A string representing an arbitrary-precision integer

  • BigInteger add(BigInteger other)

  • BigInteger divide(BigInteger other)

  • BigInteger mod(BigInteger other)

  • BigInteger multiply(BigInteger other)

  • BigInteger subtract(BigInteger other)

    These methods return a BigInteger whose value is the sum, difference, product, quotient, or remainder of this number and the other.

    Parameters: other The other number

    Returns: The result of the arithmetic operation


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint