July 2017
Intermediate to advanced
796 pages
18h 55m
English
If you use a val or var keyword to declare a variable, its data type will be inferred automatically according to the value that you assigned to this variable. You also have the luxury of explicitly stating the data type of the variable at declaration time.
val myVal : Integer = 10
Now, let's look at some other aspects that will be needed while working with variables and data types in Scala. We will see how to work with type ascription and lazy variables.
Read now
Unlock full access