Does an ? operator on a non-null property prevent any NullPointerException in the chain?
I'm having trouble understanding the following change to a piece of Kotlin code:
package org.example.kotlin.nulll.resolution
import java.util.*
object UtilResources {
private var properties: Properties? = null
fun loadProperties() {
properties = Properties()
properties?.load(UtilResources.javaClass.getResourceAsStream("/config.properties"))
}
fun getProperties(properties: String): String {
loadProperties()...