Initializer Blocks in Kotlin - Object Oriented Programming(OOP)

Опубликовано: 23 Март 2026
на канале: Programming with Alex
32
2

Kotlin and Android Full Course: https://www.udemy.com/course/kotlin-m...

What are initialiser blocks in Kotlin?
Often when working with classes and objects you will want to have some code to be executed when an instance is created, in such cases we need to use initialiser blocks which are simply blocks of code which will be executed when we create an instance of a class.