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 file handling in scala?

1 Answers  


What are implicit parameters in Scala?

1 Answers  


Is Scala a Pure OOP Language? or Java a Pure OOP Language?

1 Answers  


What is for-comprehension in scala?

1 Answers  


What is exception handling in scala?

1 Answers  


What is Scala anonymous function?

1 Answers  


What is a collection in scala?

1 Answers  


Is scala good for data science?

1 Answers  


What is Monad in Scala?

1 Answers  


What is a multiline expression in scala?

1 Answers  


Mention Some keywords which are used by Java and not required in Scala? Why Scala does not require them?

1 Answers  


What is scala closure?

1 Answers  


Categories