this is my KotlinInterface.kt
interface KotlinInterface {
fun fun1()
fun fun2()
}
this is my JavaClass.java
public class JavaClass {
public KotlinInterface test() {
return new KotlinInterface() {
@Override
public void fun2() {
}
@Override
public void fun1() {
}
};
}
}
this is my KotlinClass.kt
class KotlinClass {
fun test():KotlinInterface{
return KotlinInterface{
//how to return like java
}
}
}
I want to know how to return a interface with kotlin like with java ,thanks everybody