What is the equivalent of Java static methods in Kotlin?
There is no static keyword in Kotlin. What is the best way to represent a static Java method in Kotlin? 30 s 30 You place the function in the “companion object”. So the java code like this: class Foo { public static int a() { return 1; } } will become class Foo { companion … Read more