DEV Community

Cover image for “if vs let” in Kotlin

“if vs let” in Kotlin

Khush Panchal on March 12, 2024

Let’s start with the problem: class IfOrLet { private var string1: String? = "some string 1" init { if(string1 != null) { ...
Collapse
 
nigel447 profile image
nigel447

++1 let is threadsafe