"companion object" is the alternative for static fields and methods in Java.
So the java code like this:
class Foo {
public static String a() { return "hello"; }
}
In kotlin will look like
class Foo {
companion object {
fun a() : String = "hello"
}
}
You can then use it from inside Kotlin code as
Foo.a();