rahulsom
05/21/2017, 7:43 PMpublic interface JavaInterface {
String getId();
}
I can implement it in kotlin like this
class KotlinFromJava(private val id: String) : JavaInterface {
override fun getId() = id
}
However, that seems too verbose.
So I created a Kotlin interface.
interface KotlinInterface : JavaInterface {
val id1: String
override fun getId() = id1
}
Now I can do this.
class KotlinFromKotlin(override val id1: String) : KotlinInterface
Is there a way to write KotlinInterface without renaming the field?