diff options
author | Divay Prakash <divayprakash@users.noreply.github.com> | 2018-09-18 22:36:11 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-18 22:36:11 +0530 |
commit | a7cb341a7ab073999bc7baeabb7d98565fb01667 (patch) | |
tree | 0eb459b61286648030d80802625d103b671d52d0 | |
parent | 5e4c651c6c0b1f48b6c64191504de5029e6ed554 (diff) | |
parent | 14719728ddbe8b71379c7702d3985f1c8b352e15 (diff) |
Merge pull request #3214 from Jakobovski/Jakobovski-patch-1
[language/kotlin] Update 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 |