Java.math.MathContext Class Java.math.MathContext.equals() Method - Java.math Package

What is Java math MathContext equals() Method?

Description

The java.math.MathContext.equals(item x) compares this MathContext with the required item for equality.

Declaration

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

Overrides

Equals in class Object.

Parameters

x − Object to which this MathContext is to be compared.

Return Value

This technique returns true if and only if the specified Object is a MathContext object which has exactly the same settings as this object.

Exception

NA

Example

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