This is unsafe nullable type (T?
) conversion to a non-nullable type (T
),
!!
will throw NullPointerException
if the value is null
.
It is documented here along with Kotlin means of null-safety.
More Related Contents:
- How to make clickable listview in android using kotlin
- What is a “receiver” in Kotlin?
- Kotlin and Immutable Collections?
- Kotlin’s Iterable and Sequence look exactly same. Why are two types required?
- How to check if a “lateinit” variable has been initialized?
- How to run Kotlin class from the command line?
- Is Kotlin “pass-by-value” or “pass-by-reference”?
- Kotlin static methods and variables
- Multiple variable let in Kotlin
- How can I detect a click with the view behind a Jetpack Compose Button?
- Example of when should we use run, let, apply, also and with on Kotlin
- How to create a fat JAR with Gradle Kotlin script?
- Getters and Setters in Kotlin
- Why does this Kotlin method have enclosing backticks?
- Why does mutableStateOf without remember work sometimes?
- How to make “inappropriate blocking method call” appropriate?
- IntArray vs Array in Kotlin
- How to clone object in Kotlin?
- Cross references in type parameters
- Swift ‘if let’ statement equivalent in Kotlin
- How can one add static methods to Java classes in Kotlin
- How do I initialize Kotlin’s MutableList to empty MutableList?
- warning: Kotlin runtime JAR files in the classpath should have the same version
- Kotlin doesn’t see Java Lombok accessors?
- What’s the difference between !! and ? in Kotlin?
- Building a self-executable JAR with Gradle and Kotlin
- 0xFF0000FF An integer literal does not conform to the expected type kotlin.Int
- What does .() mean in Kotlin?
- Kotlin Ternary Conditional Operator
- Configure Kotlin extension for Gradle subprojects