https://kotlinlang.org logo
a

Andy Jiang

03/11/2022, 11:53 PM
Copy code
val a: Int = 100
    val boxedA: Int? = a
    val anotherBoxedA: Int? = a
    
    val b: Int = 10000
    val boxedB: Int? = b
    val anotherBoxedB: Int? = b
    
    println(boxedA === anotherBoxedA) // true
    println(boxedB === anotherBoxedB) // false
🧵 3
oh i see this was answered above
a

Andy Jiang

03/12/2022, 12:08 AM
Thanks anyway, Thomas! 🙂
3 Views