美文网首页
init block in kotlin

init block in kotlin

作者: Jegsavnerdeg | 来源:发表于2022-02-12 20:30 被阅读0次

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

相关文章

网友评论

      本文标题:init block in kotlin

      本文链接:https://www.haomeiwen.com/subject/gpubkrtx.html