Inner Class Can Use Variable of Class Variable
class Base {
inner class Data {
fun add() {
print("Heelo")
}
}
}
Usage
var data = Data()
data.add()
OR
var data = Data().add()
Object Class Can't Use Variable of Class Variable
class Base {
object Data {
fun add() {
print("Heelo")
}
}
}
Usage
data.add()