init block in kotlin
2022-02-12 本文已影响0人
Jegsavnerdeg
When init block execute?
The code inside the init block is the first to be executed when the class is instantiated. The init block is run every time the class is instantiated, with any kind of constructor.
Even if the class has no primary constructor, the delegation still happens implicitly, and the initializer blocks are still executed