Is equal in Kotlin?

In Kotlin, == is the default way to compare two objects : it compares their values by calling equals under the hood. Thus, if equals is overridden in your class, you can safely compare its instances using ==. For reference comparison, you can use the === operator, which works exactly the same as == in Java.

Sizin İçin Seçtik  How do you check if a list contains an item C#?

Leave a Reply

Your email address will not be published. Required fields are marked *