In Scala and Kotlin, an object with the same name as a class, used to hold utility members for the class
How can we access application context inside companion object in Android kotlin? I have a companion object inside an abstract …
android kotlin companion-objectIs there a case where a companion object (singleton) for a class is needed? Why would I want to create …
oop scala companion-objectIn Scala, if I define a method called apply in a class or a top-level object, that method will be …
scala syntactic-sugar magic-methods companion-objectWhat is the difference between an object and a companion object in a class in kotlin? Example: class MyClass { object …
object kotlin companion-objectI try to write a class to manage a SQLite DB, but I have the error message "Expecting a top …
android sqlite kotlin companion-objectI'm pretty new to kotlin and I was wondering if it's possible, and if it's against best practice to access …
kotlin companion-objectSimple sample class with companion object class MyClass { companion object { val test = 25 } } The value test can be accessed from by …
kotlin companion-objecti want to use BottomNavigationView in my app and i'm facing this problem with kotlin (never had it before with …
android-studio kotlin fragment companion-objectIs it possible to initialize an companion object before the init block in a Kotlin class? If so, how? If …
oop static kotlin companion-object static-initializerWhile trying to understand companion objects, I have written following code which counts the number of times a class was …
scala functional-programming companion-object