Created
April 23, 2018 13:08
-
-
Save Temidtech/111b8e47a71360e282144f92351f3600 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var output: String | |
output = null // Compilation error | |
================================== | |
val name: String? = null // Nullable type | |
println(name.length()) // Compilation error | |
val nonNullableString = nullableString ?: "" //returns empty string if variable is null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment