If val is a constant why we can assign mutable list to it?

So, val can be assigned only once. I can do val a = 1 but if I try a = 2 I get an error. So I should use var instead. But then I see people using val all the time with lists and arraylists, with you can add and remove elements. Doesen’t make much sense to me.

Can anyone please explain? I’m new to Kotlin and I’m just trying to understand how things works.

submitted by /u/SKTT1_Bisu
[link] [comments]