init block in Kotlin

Описание к видео init block in Kotlin

In this video, we will learn about the init block in Kotlin.

Question: init block in Kotlin
Answer: Discussed in the video.

Things to know while using the init block in Kotlin:

• The init block gets executed immediately after the primary constructor.
• The init block gets executed before the secondary constructor.
• Primary constructor parameters can be used in the initializer blocks.
• A class can have more than one init block, in this case, the initializer blocks are executed in the same order as they appear in the class body considering the properties if there are any in between.
• It does not take any parameters.

Android Interview Questions & Answers Series

Playlist:    • Android Interview Questions and Answers  

Android Interview Questions: https://github.com/amitshekhariitbhu/...

Blog: https://amitshekhar.me/blog/init-bloc...

#androiddev #androiddeveloper #interview

Hi, I am Amit Shekhar, I have mentored many developers, and their efforts landed them high-paying tech jobs, helped many tech companies in solving their unique problems, and created many open-source libraries being used by top companies. I am passionate about sharing knowledge through open-source, blogs, and videos.

You can connect with me on:

• Twitter:   / amitiitbhu  
• LinkedIn:   / amit-shekhar-iitbhu  
• GitHub: https://github.com/amitshekhariitbhu

Read all of my high-quality blogs: https://amitshekhar.me/blog

Get Mentorship: https://amitshekhar.me

Комментарии

Информация по комментариям в разработке