Skip to content
Reference > Classes

BigInteger

Definition

BigInteger var = .... ;

Extends

Extended By

None

Description

An unbounded, signed integer

Method Summary

Owner Name Return Type Description
BigInteger constructor(value) BigInteger Initialize a BigInteger object with a numerical value.
BigInteger constructor(value) BigInteger Initialize a BigInteger object by casting a string to a BigInteger. String must contain only numerical values.
Object getClassName() String Returns the string name of this object's class type.
Object toJson() String Returns a string of a json representation of this object.

Method Definitions


constructor(value)

BigInteger biginteger = new BigInteger(Number value)

Description

Initialize a BigInteger object with a numerical value.

Parameter Definition

Name Type Description
value Number  a big integer value

Example 1

1
2
3
4
BigInteger bi = new BigInteger(123456789);

// bi = 123456789
// bi.getClassName() = BigInteger

constructor(value)

BigInteger biginteger = new BigInteger(String value)

Description

Initialize a BigInteger object by casting a string to a BigInteger. String must contain only numerical values.

Parameter Definition

Name Type Description
value String  a big integer value supplied as a string

Example 1

1
2
3
4
BigInteger bi = new BigInteger("123456789");

// bi = 123456789
// bi.getClassName() = BigInteger

getClassName()

String Object::getClassName()

Description

Returns the string name of this object's class type.

Example 3

1
2
3
4
BigInteger bi = new BigInteger(123456789);
bi.getClassName();

// bi.getClassName() = BigInteger

toJson()

String Object::toJson()

Description

Returns a string of a json representation of this object.

Example 3

1
2
3
4
BigInteger bi = new BigInteger(123456789);
bi.toJson();

// bi.toJson() = 123456789