mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
scala: correct format
This commit is contained in:
parent
9ddf69a14d
commit
8c06438ec9
@ -48,7 +48,7 @@ println(10)
|
|||||||
print("Hello world")
|
print("Hello world")
|
||||||
|
|
||||||
// Declaring values is done using either var or val.
|
// Declaring values is done using either var or val.
|
||||||
// val declarations are immutable, whereas var's are mutable. Immutability is
|
// val declarations are immutable, whereas vars are mutable. Immutability is
|
||||||
// a good thing.
|
// a good thing.
|
||||||
val x = 10 // x is now 10
|
val x = 10 // x is now 10
|
||||||
x = 20 // error: reassignment to val
|
x = 20 // error: reassignment to val
|
||||||
|
Loading…
Reference in New Issue
Block a user