Using varargs from Scala June 11, 2023 by Tarik def foo(msf: String, o: AnyRef, os: AnyRef*) = println( String.format(msf, (o :: os.toList).toArray : _* ))