Kotlin Tutorial #7: Variables

preview_player
Показать описание


Let's talk about variables in Kotlin. We'll go through creating and using variables, and the difference between the var and val keywords in Kotlin.

With var, we can create "normal" variables, that is mutable variables. With val, we can create immutable variables, just like final variables in Java.

Рекомендации по теме
Комментарии
Автор

I usually define 3.14159265358979323 as pi

MIO_sh
Автор

so val is for value, my guess is confirmed. Haha.
this is borrowed from scala?

q
join shbcf.ru