diff options
author | Zohar Jackson <Jakobovski@users.noreply.github.com> | 2018-09-10 11:44:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-10 11:44:00 -0400 |
commit | 14719728ddbe8b71379c7702d3985f1c8b352e15 (patch) | |
tree | 8f20f0a5b21f6b8a2a73859bd90ae95eeeb40cd2 /kotlin.html.markdown | |
parent | 6d087ae0f289e7013807639cbd609f991f968166 (diff) |
Update kotlin.html.markdown
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 |