014 init Block : Kotlin Programming Language

Опубликовано: 07 Октябрь 2024
на канале: Sarthi Technology
340
6

Sometimes we want to do some initial work immediately after the creation of object. That work we do in the constructor in the java. But in Kotlin we cannot do any operation in the primary constructor because primary constructor has no body in the Kotlin language. This is the reason we have init block in the Kotlin. So watch this video till the end to understand the concept of inti block in the Kotlin language.

For any query and suggestion please feel free to contact through Comment box and Facebook Page.

Please like us on Facebook: facebook.com/SarthiTechnology