Scala Interview Questions | Cloud Data Engineer #ProgrammingTips #adf #scala #java

preview_player
Показать описание
Q55. Explain Scala Closures with example

Scala Closures Explained! 🤯 Functions that 'remember' their environment. Example inside! #Scala #Closures #FunctionalProgramming

Watch now and learn! #Azure #DataFactory #CloudArchitectAbhiram

Don't forget to like, comment, and subscribe for more Scala interview preparation content! 🔥💡

👉 If you found this video helpful, don’t forget to hit the like button and subscribe for more Scala tutorials!
📢 Have questions or tips of your own? Drop them in the comments below!
Рекомендации по теме
Комментарии
Автор

Code:

scala> def closure1={
| val pi=3.14;
| (x:Int) =>pi*x*x
[ | }
def clouser1: Int => Double

scala> val pi=3.5
[ | clouser1(10)
val pi: Double = 3.5
val res20: Double = 314.0

[scala> val c=clouser1

[scala c(10)
val res21: Double =314.0

CloudMaster_Abhiram
join shbcf.ru