A variable is named a reference to a memory location. The location stores the data that is used by the program.
a)
Mutable Collections
b) Immutable Collections
a)
Mutable Variables are those that allow us to change its value any time in
the code.
e.g.: var keyword
b)
Immutable Variables that are
made immutable are read-only variables
in Scala. This means their value remains unchanged throughout the
program. E.g.: val keyword.
No comments:
Post a Comment