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 var and value?



What is the difference between var and value?..

Answer / Nutan Yadav

In Scala, a `var` is a mutable variable, meaning its value can be changed during runtime. A `value`, on the other hand, is an immutable variable whose value cannot change once it's assigned. In general, use `val` for constants and `var` for variables that require modification.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Scala Interview Questions

How to install scala? Explain

1 Answers  


How scala is different from java?

1 Answers  


What is the difference between :: and #:: in Scala? What is the difference between ::: and #::: in Scala?

1 Answers  


How do I append data in a list?

1 Answers  


What is the difference between call-by-value and call-by-name function parameters?

1 Answers  


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

1 Answers  


What are option, some and none in scala?

1 Answers  


What is an anonymous object in scala?

1 Answers  


What is scala and why it is used?

1 Answers  


Like Java’s java.lang.Object class, what is the super class of all classes in Scala?

1 Answers  


What is akka in scala?

1 Answers  


What is an array in scala?

1 Answers  


Categories