mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-27 15:43:58 +00:00
Merge pull request #1375 from kalebdavis/patch-3
Add examples to show how printing works
This commit is contained in:
commit
3caa2d8487
@ -43,9 +43,13 @@ Scala - the scalable language
|
||||
// Printing, and forcing a new line on the next print
|
||||
println("Hello world!")
|
||||
println(10)
|
||||
// Hello world!
|
||||
// 10
|
||||
|
||||
// Printing, without forcing a new line on next print
|
||||
print("Hello world")
|
||||
print(10)
|
||||
// Hello world!10
|
||||
|
||||
// Declaring values is done using either var or val.
|
||||
// val declarations are immutable, whereas vars are mutable. Immutability is
|
||||
|
Loading…
Reference in New Issue
Block a user