Java BigInteger equals() method

The equals() methodof Java BigInteger class is used to compare this BigInteger with the specified Object for equality.This method overrides equals in class Object.

Syntax:

Parameter:

x ? Object to which this BigInteger is to be compared.

Returns:

This method returnstrue if and only if the specified Object is a BigInteger whose value is numerically equal to this BigInteger.

Example

Test it Now

Output:

111 equals BigInteger111 istrue
111 equals object  value 111  isfalse

Next TopicJava BigInteger




Latest Courses