Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is a closure in Scala?



What is a closure in Scala?..

Answer / 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

More Scala Interview Questions

How scala is different from java?

1 Answers  


Explain the functionality of yield?

1 Answers  


Mention Some keywords which are used by Java and not required in Scala? Why Scala does not require them?

1 Answers  


List the default imports are available in scala language?

1 Answers  


Explain extend keyword?

1 Answers  


In FP, What is the difference between a function and a procedure?

1 Answers  


mention the types of variables in scala? And what is the difference between them?

1 Answers  


Explain recursion through a program?

1 Answers  


Can scala learn without java?

1 Answers  


What is option/some/none design pattern in scala?

1 Answers  


Difference between Scala’s Inner class and Java’s Inner class?

1 Answers  


Explain the difference between array and list in scala?

1 Answers  


Categories