4 ms·
That's another quality of life improvement in Kotlin, == calls the equals method on the objects, not comparing their references. Which is what most java program
by matsemann 4y ago
That's another quality of life improvement in Kotlin, == calls the equals method on the objects, not comparing their references. Which is what most java programmers want in 99% of cases. And makes the code more readable, a.equals(b) is harder to read than a == b.
- marginalia_nu 4y agoIn most cases I'd use equals(a, b) in Java (with a static import of Objects.equals). It's both null safe and more readable.