diff options
Diffstat (limited to 'kotlin.html.markdown')
-rw-r--r-- | kotlin.html.markdown | 6 |
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 |