© Peter Späth 2019
Peter SpäthLearn Kotlin for Android Developmenthttps://doi.org/10.1007/978-1-4842-4467-8_11

11. Handling Equality

Peter Späth1 
(1)
Leipzig, Germany
 

There is a strong distinction between identity and equality. Two things are identical if they actually are the same. If you bought a white candle this morning, let’s call it A, the white candle in your shopping bag and the white candle that this afternoon is placed in your candleholder are the same and thus identical (presume this is the only candle you own). Now assume you bought a second candle, B, of the same type from the same manufacturer. Apart from some linguistic mistakes you sometimes hear, those two candles are not the same. Candles A and B are not the same, but they are ...

Get Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.