Java.math.Context.Class Java.math.MathContext.getPrecision() Method - Java.math Package

What is Java math MathContext getPrecision() Method?

Description

The java.math.MathContext.getPrecision() returns the precision placing. This value is always non-negative.

Declaration

Following is the declaration for java.math.MathContext.getPrecision() technique.

Parameters

NA

Return Value

This technique returns an int which is the value of the precision setting.

Exception

NA

Example

The following example shows the usage of math.MathContext.getPrecision()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