1.

Explain the difference between val and var in Scala?

Answer»
S.noValVar
1.Refers to valueRefers to variable
2.Is constantIs changeable
3.Immutable DECLARATION of variablesMutable declaration of a variable
4.Cannot REASSIGN VALUES once CREATEDReassign values once its created


Discussion

No Comment Found