Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun useNullSafe() {
- // val notNull : String = null
- val nullable : String? = null
- // nullable.toLowerCase()
- if (nullable != null) {
- println(nullable.toLowerCase())
- }
- nullable?.let { println(it.toLowerCase()) }
- println(nullable!!.toLowerCase())
- }
Add Comment
Please, Sign In to add comment