Home »
MCQs »
Scala MCQs
Which syntax to pass the variable argument to function in Scala?
79. Which syntax to pass the variable argument to function in Scala?
- (int a, int b, int c, ….)
- (a : Int, b : Int, c:Int, …)
- (args: String*)
- None of these
Answer: C) (args: String*)
Explanation:
The syntax to pass the variable argument to function in Scala is:
(args: String*)