From 14719728ddbe8b71379c7702d3985f1c8b352e15 Mon Sep 17 00:00:00 2001 From: Zohar Jackson Date: Mon, 10 Sep 2018 11:44:00 -0400 Subject: Update kotlin.html.markdown --- kotlin.html.markdown | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v1.2.3