In this lesson, you'll learn how to create a class with multiple constructors. Watch the entire FREE Kotlin Programming course here: • How to Install the Int...
Wow... this is amazing...thank you so much for this thorough and detailed video , it provided me with a lot of clarity and deep insights into constructors!
Great tutorial, but I don't like how Kotlin have designed this, this means, there can't be any proper constructor overloading, if we have to call the "primary constructor", this is one aspect that I think is far better in Java. What if we don't want to have those default values? What if we want one constructor that takes no arguments? What would be the best workaround for this?
Thank you so much, Donn! but what happens if the main constructor has only one param and I need to add another constructor which has more params? Thanks again
Hello this is a great video! How would you do this for a child class where the parent has multiple constructors, but the child also has multiple constructors. How would a child be able to call different super() methods depending on the constructor?
Clear
Wow... this is amazing...thank you so much for this thorough and detailed video , it provided me with a lot of clarity and deep insights into constructors!
Glad it helped!
Great tutorial, but I don't like how Kotlin have designed this, this means, there can't be any proper constructor overloading, if we have to call the "primary constructor", this is one aspect that I think is far better in Java.
What if we don't want to have those default values? What if we want one constructor that takes no arguments? What would be the best workaround for this?
Thank you so much, Donn! but what happens if the main constructor has only one param and I need to add another constructor which has more params? Thanks again
Hello this is a great video! How would you do this for a child class where the parent has multiple constructors, but the child also has multiple constructors. How would a child be able to call different super() methods depending on the constructor?