hashCode

override fun hashCode(): Int

Returns a hash code value for this number.


Calling from Kotlin

Here's an example of calling this method from Kotlin code:

val first = Zero()
val second = Zero()
val actual: Boolean = first.hashCode() == second.hashCode()
assertTrue(actual)

Calling from Java

Here's an example of calling this method from Java code:

final int first = new Zero()
.hashCode();
final int second = new Zero()
.hashCode();
Assertions.assertEquals(first, second);