<@U3DE1TXKP> In kotlin you can use @JvmStatic insi...
# announcements
b
@robstoll In kotlin you can use @JvmStatic inside an object to create the truly static method, example:
Copy code
class C {
    companion object {
        @JvmStatic fun staticMethod() {}
        fun instanceMethod() {}
    }
}
You have this class with a companion object and in this object has two methods, one annotated with @JvmStatic. With jvmstatic annotation the compiler will generate both a static method in the enclosing class of the object and an instance method in the object itself:
Copy code
C.foo(); // works fine
C.bar(); // error: not a static method
C.Companion.foo(); // instance method remains
C.Companion.bar(); // the only way it works