There is no static
keyword in Kotlin.
What is the best way to represent a static
Java method in Kotlin?
You need to pass companion object for static method because kotlin don’t have static keyword - Members of the companion object can be called by using simply the class name as the qualifier:
package xxx
class ClassName {
companion object {
fun helloWord(str: String): String {
return stringValue
}
}
}