Please explain closure is scala?



Please explain closure is scala?..

Answer / Ramniwas

In Scala, a Closure is an anonymous function that has access to the variables of its enclosing scope. This means that when a function is defined inside another function (or anywhere within a block), it can refer to and manipulate variables in the outer scope even after the outer function has completed execution.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Scala Interview Questions

Give some examples of packages in scala?

1 Answers  


Explain the difference between java and scala?

1 Answers  


How scala is both functional and object-oriented programming language?

1 Answers  


What is method overriding in scala?

1 Answers  


What is Case Classes?

1 Answers  


Differentiate between null, nil, none and nothing?

1 Answers  


What are the advantages of case class?

1 Answers  


Does Scala support all Functional Programming concepts? Does Java 8 support all Functional Programming concepts?

1 Answers  


How does it work under-the-hood, when we create an instance of a Class without using ‘new’ keyword in Scala? When do we go for this approach?

1 Answers  


What is an ofdim method in scala?

1 Answers  


What is a monad in scala? Explain

1 Answers  


Tell the advantages of companion objects when used in scala?

1 Answers  


Categories