posagogo.blogg.se

Kotlin nullable string
Kotlin nullable string








In other words, we’ve always had something inside that bucket. In all the code that we’ve written so far, we’ve created variables that contain a value. How can he do that?Īs you might recall from Chapter 1, a variable is like a bucket that holds a value. Instead, he needs a way to tell Kotlin that they didn’t leave a star rating at all. When someone doesn’t leave a star rating, then James doesn’t want to show a zero-star rating on the screen. James realized that a zero-star rating is not the same thing as having no star rating.

kotlin nullable string

He thought that his solution would work well, but when the guests saw the review, they thought, “Wow, if Lucy didn’t like the coffee, maybe it’s not good. This is what showed on the screen: Latest coffee reviews

kotlin nullable string kotlin nullable string

Printing the coffee reviews to the screen










Kotlin nullable string