Skip to content

Glossary: Kotlin Basics

!! (non-null assertion)

Also written: !!, non-null asserted call

The `!!` operator tells Kotlin to treat a nullable value as non-null. If the value is actually null, the program crashes with a `NullPointerException`, so `?.`, `?:` or an `if` check is usually safer.

Where the book teaches it

Related terms

nullNullPointerException