Are default arguments shared between instances? E....
# getting-started
j
Are default arguments shared between instances? E.g. in a data class like
data class Foo(val foo: List<String> = mutableListOf())
?
1
🚫 4
t
No, they are basically the same as telescoping constructors would be in Java class Foo{ public Foo() { this(new ArrayList()); } public Foo(List foo){ ... } }
j
Thanks!