Java BigInteger hashCode() 方法

2025年3月20日 | 阅读时长1分钟

Java BigInteger 类的 hashCode() 方法用于计算此 BigInteger 的哈希码。此方法覆盖了 Object 类中的 hashCode。

语法

参数

不适用。

返回值

此方法返回此 BigInteger 的哈希码。

Exception

不适用

示例 1

输出

Hash code of 123 is 123
Hash code of 1234567 is 1234567

示例 2

输出

Hash code of 9234567879 is 644633349
Hash code of 12345678901 is -539222925
 
下一主题Java BigInteger