Skip to content

Instantly share code, notes, and snippets.

@AndroidPoet
Created May 6, 2022 06:11
Show Gist options
  • Save AndroidPoet/0182cab89a207b24947333e8a1d88e02 to your computer and use it in GitHub Desktop.
Save AndroidPoet/0182cab89a207b24947333e8a1d88e02 to your computer and use it in GitHub Desktop.
Variables
fun main() {
//var can be reassigned
var varInt: Int = 1
var varString: String = "Hello"
var varDouble: Double = 24.0
var varLong: Long = 30L
//val can't be reassigned
val valInt: Int = 1
val valString: String = "Hello"
val valDouble: Double = 34.0
val valLong: Long = 30L
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment