Home »
MCQs »
Scala MCQs
Closures in Scala are –
82. Closures in Scala are -
- Functions that return multiple values
- Functions that can accept variable arguments
- Functions that use a value from outside of the function's body
- None of these
Answer: C) Functions that use a value from outside of the function's body
Explanation:
The Scala Closures are functions which uses one or more free variables and the return value of this function is dependent of these variable.