Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
Mobile APP
→
PhoneGap in Mobile APP
→
What’s the difference between lazy and lateinit?
1.
What’s the difference between lazy and lateinit?
Answer»
Lateinit
Lazy
It is
LATE
initialization
It is lazy initialization.
It can be
INITIALIZED
from anywhere in the object
It can be initialized only from the lambda function.
It can only be used for var type.
It can only be used for Val type.
Multiple
INITIALIZATIONS
are possible in lateinit.
Only a
SINGLE
initialization is allowed here.
It is not allowed in
PROPERTIES
of primitive types.
It is allowed on properties of primitive types.
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
What’s Null Safety and Nullable Types in Kotlin?
What is a purpose of Companion Objects in Kotlin?
How to create singleton class in kotlin?
Where should I use var and where val?
How to initialize an array in Kotlin with values?
How to create empty constructor for data class in Kotlin?
What is the difference between inline and infix functions?
What are constructors, explain its types?
List down the basic data types in Kotlin?
Mention the type of strings present in Kotlin?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies