Use as a replacement for Java static methods and fields
suggest changeobject CommonUtils {
var anyName: String = "Hello"
fun dispMsg(message: String) {
println(message)
}
}
From any other class, just invoke the variable and functions in this way:
CommonUtils.anyName
CommonUtils.dispMsg("like static call")
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents