easyStudy question · answer published in Android interview questions, so no pointsandroidkotlinnull-safety
What !! does on null
What happens when this line runs and token is null?
val token: String? = prefs.getString("token", null)
val length = token!!.lengthDiscussion 0
Join free to post in the discussion.
Related questions
- Android activity start orderMobile App Developer
- Kotlin Elvis operatorMobile App Developer
- Kotlin val with a mutable listMobile App Developer
- Kotlin data class equalityMobile App Developer
- What AndroidManifest.xml is forMobile App Developer
- Sharing text to any appMobile App Developer
- Play Console rejects the build versionMobile App Developer
- Dart null-aware operatorsMobile App Developer