--- lang: ja-jp breaks: true --- # Kotlin ビックリマーク二つ`!!`(Not-Null Assertion Operator) の意味 2021-08-06 ## C#の`.Value`と同じ意味 > Not-Null Assertion Operator > https://engawapg.net/kotlin/116/ ```kotlin= val str: String? = "test" val len = str!!.length // 4 ``` ```kotlin= val str: String? = null val len = str!!.length // NullPointerException ``` ###### tags: `Kotlin` `!!` `Not-Null Assertion Operator`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up