Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What are the types of Variables in Scala? And What is the difference between them?
Home
Scala Constructs
What are the types of Variables in Scala? And What is the difference between them?
0
votes
asked
Apr 21, 2022
in
Scala Constructs
by
sharadyadav1986
What are the types of Variables in Scala? And What is the difference between them?
scala-variables
scala-data-types
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Apr 21, 2022
by
sharadyadav1986
The
Variables in Scala
are mainly of two types:
Mutable Variables
We Declare Mutable Variables by using the var keyword.
The values in the Mutable Variables support Changes
Immutable Variables
We declare Immutable Variables using the val keyword.
The values in Immutable Variables do not support changes.
...