eddard.stark eddard.stark - 1 year ago 81
Java Question

How to use Array[String] in a function expecting String* in Scala

I have a function in Scala that requires a String vararg, i.e.

. How can I call that function if I have an

Answer Source

You can use : _* for that

def f(strings: String*) {

f(Array("a", "b", "c"): _*)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download