Possible Duplicate:
What does:_*
(colon underscore star) do in Scala?
Iām using the REPL to call a Java vararg method with a Scala Array.
I get an error if I do this:
case class Person(name: String, age: Int)
val array = Array(classOf[String], classOf[Int])
Person.getClass.getMethod("apply", array)
But if I do this then it works:
Person.getClass.getMethod("apply", array:_*)
My questions is what does :_*
do? Where is it defined in the Scala API?