I have Kotlin code as below, SingleKotlin.instance can be called by other Kotlin files
class SingleKotlin private constructor(){ companion object { val instance by lazy { SingleKotlin() } } }
However, when I try to call SingleKotlin.instance from java, it shows that it cannot resolve the instance symbol
I donβt understand why, can anyone explain and how can I solve this problem?
source share