Last active
January 22, 2017 12:13
-
-
Save dgadiraju/62ecd415dee95edf100153401a8d0125 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
//Immutable | |
val i = 10 //Smart enough to figure out the data type | |
val i: Int = 0 //Data type can be defined explicitly as well | |
//This does not work i = i + 1, as i is defined as immutable (val) | |
//Mutable | |
var j = 20 | |
j = j + 1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment