How I create a class with two "constructors" that ...
# getting-started
f
How I create a class with two "constructors" that on does not receive any value so run a big code block to init the properties and another that receives the properties already initialized?
m
That's the only way I know of: https://pl.kotl.in/nUsCnILEs
f
thanks
m
I would favor class B from the above snippet. I suggest reading deeper here: https://kotlinlang.org/docs/reference/classes.html#constructors (secondary constructors paragraph)
f
Yeah, I was a bit clunky with constructors in kotlin.