Medium
interface Named {
val name: String
}
interface Human : Named {
val firstName: String
val lastName: String
override val name: String get() = "$firstName $lastName"
}
I'd like to create a data class with a vip property implementing the Human interface, for this I should write:
Author: W3D TeamStatus: PublishedQuestion passed 545 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!
2
Concatenate two strings in Kotlin2
Print the value of a nullable string in Kotlin7
How to flatten a list of lists in Kotlin4
Kotlin: Compile the following code and see the error.3
Write a Kotlin program that evaluates an arithmetic expression.5
Write a function that returns the maximum of two integers in Kotlin2
How to add a new element to a list of Kotlin data class