Last active
September 18, 2019 07:25
-
-
Save MithraTalluri/e0ea88fd6fec3928c26967faea610b91 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
val str1: String = null // compile time error | |
val str2: String? = null // compiles fine | |
val handler: EmailHandler? = null | |
handler.sendEmail() // compile time error | |
handler?.sendEmail() // compiles fine but doesn't call sendEmail() function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment