What difference between !! and ? in Kotlin, see below table. November 5, 2019nhancvLeave a Comment on What difference between !! and ? in Kotlin, see below table. a: String?a.lengtha?.lengtha!!.length“cat”Compile-time error33nullCompile-time errornullNullPointerException Ref: https://kotlinlang.org/docs/reference/null-safety.html Share this:Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window)Click to print (Opens in new window)Click to share on Telegram (Opens in new window)Click to share on WhatsApp (Opens in new window)Click to email a link to a friend (Opens in new window)Click to share on Tumblr (Opens in new window)Click to share on Pocket (Opens in new window)