Does val property has a setter or not ? And is it ...
# getting-started
h
Does val property has a setter or not ? And is it equivalent to var property having private setter? E.g. 'val a = 2' is same as 'var a = 2 private set'
j
By definition
val
properties don't have a setter. It's not equivalent to
private set
on a
var
, because even inside the class declaring the
val
you wouldn't be able to set it (unlike a
private set
)
h
Oh.. thank u