Answers for "kotlin access variable from another class"

2

kotlin access variable from another class

class Test {
companion object {
        var mInteger: Int = 5
    }
}

//You can call like this
Test.Companion.mInteger
or
Test.mInteger
Posted by: Guest on October-15-2021

Code answers related to "kotlin access variable from another class"

Browse Popular Code Answers by Language