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...


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



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

Answer / Chandrajeet Verma

In Scala, there are three main types of variables: Val, Var, and Def. nnVal: It is a constant variable that cannot be reassigned after being initialized.nVar: It is a mutable variable that can be reassigned multiple times.nDef: It is a shortcut for lazy variables (val with a delayed initialization).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Scala Interview Questions

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

1 Answers  


What is the difference between apply and unapply methods in scala?

1 Answers  


What do you mean by option in scala and why it is used?

1 Answers  


Why do we need app in scala?

1 Answers  


Why scala prefers immutability?

1 Answers  


Is scala better than java?

1 Answers  


What is the best Framework to generate REST API documentation for Scala-based applications?

1 Answers  


What does raw method in scala string interpolation?

1 Answers  


What is scala trait?

1 Answers  


What is a stream in scala?

1 Answers  


Explain the advantage of scala over other programming languages?

1 Answers  


What are option, some and none in scala?

1 Answers  


Categories