Answer Posted / Manoj
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 View All Answers