What is the difference between val and var in kotlin | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the difference between val and var in kotlin

interest to kotlin

24th May 2017, 7:21 AM
Baki Billah 131312
Baki Billah 131312 - avatar
2 Answers
+ 1
val is immutable, like Java's final. var is mutable.
24th May 2017, 10:24 AM
Venkatesh Pitta
Venkatesh Pitta - avatar