1.

Different types of variables in Scala explain them?

Answer»

Different types of variables in Scala explain them?
There are mainly TWO types of variables in Scala which are given below
(1)Mutable Variables
(2)Immutable variables
(1)Mutable Variables:-
(i)Mutable variable are declare by using the "var" keyword.
(ii)And the values in Mutable variables support changes.
(2)Immutable variables:-
(i)Immutable variables are declare by using "VAL" keyword.
(ii)And the values in Immutable variable do not support changes.



Discussion

No Comment Found