I am currently learning the Kotlin language.
I want to know what is a Companion Object, and why do we need it?
I think there is a similar concept in Scala.
I am currently learning the Kotlin language.
I want to know what is a Companion Object, and why do we need it?
I think there is a similar concept in Scala.
Members of the companion object can be called by using simply the class name as the qualifier
like a java static
if called Anothrer class's member variable or method you use that companion object