Kotlin - Functions
What is wrong with this Kotlin function declaration?
fun display(vararg names: String, age: Int) {
// body
}What is wrong with this Kotlin function declaration?
fun display(vararg names: String, age: Int) {
// body
}vararg parameter is allowed and it must be the last parameter.vararg names is followed by age, which is invalid.vararg parameter must be the last parameter. -> Option A15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions