Which syntax to pass the variable argument to function in Scala?

79. Which syntax to pass the variable argument to function in Scala?

  1. (int a, int b, int c, ….)
  2. (a : Int, b : Int, c:Int, …)
  3. (args: String*)
  4. None of these

Answer: C) (args: String*)

Explanation:

The syntax to pass the variable argument to function in Scala is:

(args: String*)

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.