0
Why there cannot be more than one primary constructor?
3 Réponses
+ 5
The secondary all must call the primary as that is where the storage is allocated in a wrapper that nests your primary. Have two primaries would cause major issues with that design as the compiler can not guarentee the properties were properly initialized.
+ 1
What is you question, maybe I can help you?
0
Hi, As in Kotlin we have two types of constructors " Primary" and "Secondary". There can be multiple secondary constructor but only one primary construct constructor. Why?