Q:lazy和lateinit有什么不同? A:lazy can only be used for val properties, whereas lateinit can only be applied to vars because it can't be compiled to a final field, thus no immutability can be guaranteed. lateinit var can be initialized from anywhere the object is seen from.
转载于:https://my.oschina.net/tanghaoo/blog/2435605