美文网首页
'by lazy' and 'lateinit'

'by lazy' and 'lateinit'

作者: Jegsavnerdeg | 来源:发表于2021-12-05 20:41 被阅读0次

    In Kotlin, if you don't want to initialize a class property inside the constructor or in the top of the class body, you have basically these two options (from the language reference):

    https://agrawalsuneet.github.io/blogs/lateinit-vs-lazy-property-in-kotlin/

    相关文章

      网友评论

          本文标题:'by lazy' and 'lateinit'

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