What is a closure?
Answer / Lalit Kumar Saini
A closure in Scala is a function that has access to the variables of its outer function, even when the outer function has returned. This allows inner functions to refer to and manipulate variables defined in their surrounding context.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is case class? What is case object? What are the Advantages of case class?
What does map in scala collection?
What is a tuple in scala?
Explain what is unit in scala?
What is the advantage of Scala?
What are the data types in scala?
What is scala and why it is used?
What is akka in scala?
How scala is different from java?
What is an array in scala?
What is Range in Scala? How to create a Range in Scala?
What is flatmap in scala?