Hi 2 all! please explain to me, what's difference?...
# getting-started
s
Hi 2 all! please explain to me, what's difference? advantage?
m
in this particular example you are not using default values for your parameters and therefor you have to set all of them all the time, so you can’t see any real benefit here.
if you instead have defaults in kotlin, like in the java version, you can see that the difference is that you can do it all with one constructor instead of four.
m
And strictly speaking, you don't need the
number
in the second one, do you? As Kotlin will fill in parameters if the types work, and no named ones.
👍 1
m
corrected
👍 1
s
thank you, I am understand !