Java.math.BigInteger Class Java.math.BigInteger.subtract() Method - Java.math Package

What is Java math BigInteger subtract() Method?

Description

The java.math.BigInteger.subtract(BigInteger val) returns a BigInteger whose value is (this - val).

Declaration

Following is the declaration for java.math.BigInteger.subtract() technique.

Parameters

val − value to be subtracted from this BigInteger

Return Value

This technique returns a BigInteger object of value, this - val.

Exception

NA

Example

The following example shows the usage of math.BigInteger.subtract()technique.

Let us compile and run the above program, this will produce the following result −


All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Java.math Package Topics