Each class can have only one singleton companion o...
# getting-started
d
Each class can have only one singleton companion object, and the singleton companion object’s method’s appear on the class’s namespace, so it doesn’t need to be assigned to a variable to be accessed. For example
FooClass { companion object { fun compMethod() { ... } } }
could be called like
FooClass.compMethod()
.