Created
January 29, 2018 21:02
-
-
Save quiro91/1704c6a98193dba8b84a104e8c71edc9 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 something: String? = getSomething() | |
fun main(args: Array<String>) { | |
nowItsNotAVarAnymore(something) | |
} | |
fun nowItsNotAVarAnymore(param: String?) { | |
if (param) { | |
println("Param is not nullable and contains ${param.length} characters) | |
} else { | |
println("Param was nullable") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment