equals

operator override fun equals(other: Any?): Boolean

Returns true if the other object is an instance of Zero, or returns false otherwise.


Calling from Kotlin

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

val first = Zero()
val second = Zero()
val result: Boolean = first == second // or first.equals(second)
println(result) // true

Calling from Java

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

final Zero first = new Zero();
final Zero second = new Zero();
final boolean result = first.equals(second);
System.out.println(result); // true