Created
June 7, 2015 03:56
-
-
Save nicholasf/6a290e8ee8f2ca12de83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> val foo = "one" | |
foo: String = one | |
scala> foo = "two" | |
<console>:19: error: reassignment to val | |
foo = "two" | |
^ | |
scala> //fair enough! but ... | |
scala> val numbers = Array(1,2,3) | |
numbers: Array[Int] = Array(1, 2, 3) | |
scala> numbers(0) = 99 | |
scala> numbers | |
res116: Array[Int] = Array(99, 2, 3) | |
scala> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment