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 result: Boolean = first.hashCode() == second.hashCode()
println(result) // true

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();
System.out.println(first == second); // true