Complete the code to call a Kotlin function from Java.
KotlinClass.[1]();The Kotlin function greet is called from Java using the class name and method name.
Complete the Java code to create an instance of a Kotlin class.
KotlinClass [1] = new KotlinClass();We create a new instance of the Kotlin class and assign it to the variable named instance.
Fix the error in calling a Kotlin function with parameters from Java.
int result = kotlinObj.[1](5, 3);
The Kotlin function is named addNumbers, so calling it with the correct name fixes the error.
Fill both blanks to call a Kotlin property getter from Java.
String name = kotlinObj.[1](); System.out.println(name [2] " is called from Java.");
The Kotlin property name is accessed via its getter getName() in Java. The plus sign + concatenates strings.
Fill all three blanks to call a Kotlin companion object function from Java.
int max = KotlinClass.[1].[2]([3]);
In Java, Kotlin companion object functions are accessed via the Companion object. The function maxOf is called with arguments 10, 20.