![]() ![]() For example, when you declare a favoriteActor variable, you may assign it a "Sandra Oh" string value immediately. In Unit 1, you learned that when you declare a variable, you need to assign it a value immediately. A web browser with access to Kotlin Playground.How to provide a default value when a nullable variable is null with the if/else expression or the ?: Elvis operator.How to convert a nullable variable to a non-nullable type with if/else expressions.How to perform null checks with if/else conditionals.safe-call operator and !! non-null assertion operator. How to access methods and properties of nullable variables with the ?. ![]()
0 Comments
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |