summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--kotlin.html.markdown6
1 files changed, 6 insertions, 0 deletions
diff --git a/kotlin.html.markdown b/kotlin.html.markdown
index 0c787d7e..86d1baa0 100644
--- a/kotlin.html.markdown
+++ b/kotlin.html.markdown
@@ -370,6 +370,12 @@ fun useObject() {
val someRef: Any = ObjectExample // we use objects name just as is
}
+
+/* The not-null assertion operator (!!) converts any value to a non-null type and
+throws an exception if the value is null.
+*/
+var b: String? = "abc"
+val l = b!!.length
```
### Further Reading