Java.math.BigDecimal Class Java.math.BigDecimal.signum() Method - Java.math Package

What is Java math BigDecimal signum() Method?

Description

The java.math.BigDecimal.signum() returns the signum function of this BigDecimal.

Declaration

Following is the declaration for java.math.BigDecimal.signum() technique.

Parameters

NA

Return Value

This technique returns -1, 0, or 1 as the value of this BigDecimal is negative, zero, or positive.

Exception

NA

Example

The following example shows the usage of math.BigDecimal.signum()technique.

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

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

Java.math Package Topics