Interoperability between Java and Kotlin is very strong by default. However, there are a number of options available to us so that we can improve how we can use Kotlin from Java. We can use the @JvmName annotation to control the name Java classes that are generated from our Kotlin code. By using the @JvmOverloads annotation, we can generate method overloads to help us take advantage of default parameter values that are not supported in Java. While Kotlin does not have a static keyword, we can use the @JvmStatic annotation to mark properties and methods of companion objects. By doing this, the compiler will generate true JVM static methods for accessing these properties and methods with a syntax that feels much more natural from Java.
We also saw how we can provide alternative names for our companion objects to improve the call-site syntax in Java and to provide increased...