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

10. True, False, and Undecided: Nullability

Peter Späth1 
(1)
Leipzig, Germany
 

At school you learned about the dichotomy of true versus false, and you probably heard that there is nothing else. Reading this book, thus far, you have learned that in Kotlin there exists a boolean type Boolean with exactly those possible values: true and false. Period. Really?

If you think about real life, experience suggests something else. Ask someone: Is it going to rain tomorrow? Maybe the answer is yes, and maybe it is no. Honestly, though, no one knows with 100 percent certainty. We therefore have true, false, and undecided (or unknown). This trichotomy ...

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.