Ayden
09/11/2021, 1:42 AMval
?Katrina Eaton
09/11/2021, 1:45 AMfun someFun(n : Int) {
val x = n
}
Ayden
09/11/2021, 1:58 AMephemient
09/11/2021, 3:33 AMparameters are final and cannot be changed inside the function
val
, yesnkiesel
09/11/2021, 5:04 AMvar n = n
inside the function which creates a local variable with the same name, shadowing the parameter. But generally, this is not good style because it makes it appear as if you can modify the parameter (which you can not as @ephemient explained)