Kotlin - Functions
Which of the following is the correct syntax to declare a function with a vararg parameter in Kotlin?
fun printAll(____ numbers: Int) { for (n in numbers) println(n) }Which of the following is the correct syntax to declare a function with a vararg parameter in Kotlin?
fun printAll(____ numbers: Int) { for (n in numbers) println(n) }vararg (singular) to declare variable number of arguments.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions