init Block (Kotlin)

An init block contains initialization code that runs when an instance is created, as part of the primary constructor. It's where you put validation or setup…