hashCode

override fun hashCode(): Int

Returns a hash code value for this number.


Calling from Kotlin

Here's an example of calling this function 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 function from Java code:

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