mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-06 06:47:54 +02:00
Improve Kotlin variables explanation
This commit is contained in:
@@ -26,7 +26,7 @@ any parameters.
|
|||||||
*/
|
*/
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
/*
|
/*
|
||||||
Declaring values is done using either "var" or "val".
|
Declaring variables is done using either "var" or "val".
|
||||||
"val" declarations cannot be reassigned, whereas "vars" can.
|
"val" declarations cannot be reassigned, whereas "vars" can.
|
||||||
*/
|
*/
|
||||||
val fooVal = 10 // we cannot later reassign fooVal to something else
|
val fooVal = 10 // we cannot later reassign fooVal to something else
|
||||||
|
Reference in New Issue
Block a user