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 the difference between 'val' and 'lazy val' in Scala? What is Eager Evaluation? What is Lazy Evaluation?



What is the difference between 'val' and 'lazy val' in Scala? What is Eager Eval..

Answer / Amit Singh Bisht

In Scala, 'val' is a value that is initialized when it is defined. This process is known as Eager Evaluation. On the other hand, 'lazy val' initializes the value only when it is first accessed or needed. This is called Lazy Evaluation.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Scala Interview Questions

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

1 Answers  


what are the features of scala?

1 Answers  


What is akka in scala?

1 Answers  


What are the advantages of scala over java (java 8)?

1 Answers  


What is scala and why it is used?

1 Answers  


What is a class in scala?

1 Answers  


What is try catch in scala?

1 Answers  


What are option, some and none in scala?

1 Answers  


Differentiate between null, nil, none and nothing?

1 Answers  


What is the current latest version of scala? What is the major change or update in scala 2.12?

0 Answers  


What is the use of ‘???’ in Scala-based Applications?

1 Answers  


What are the available Unit Testing, Functional Testing and/or BDD Frameworks for Play and Scala Based applications?

1 Answers  


Categories