Kotlin Kotlin for Java Developers Equality & Identity


Example

Kotlin uses == for equality (that is, calls equals internally) and === for referential identity.

JavaKotlin
a.equals(b);a == b
a == b;a === b
a != b;a !== b

See: https://kotlinlang.org/docs/reference/equality.html