Answer Posted / Akash Yadav
A 'closure' in Scala (and other languages) refers to a function that has access to variables defined outside its immediate scope. This means that if a function captures and stores references to some of the local variables during its creation, it can still access these variables even when it is invoked later or passed as an argument to another function.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers