Object-Oriented Programming in Kotlin | by Ankush Kumar Singh | Jan, 2022

As explained with code examples and illustrations

Photo by Ayla Verschueren on Unsplash
Illustration by author
woof!
nom nom!
I love walking with my hooman. And occasional zoomies!
nora has following properties,
Weight is 10
Height is 22
Average life expectancy is 10
This is init block. Notice where it's getting executed!
woof!
nom nom!
I love walking with my hooman. And occasional zoomies!
Nora has following properties,
Weight is 10
Height is 22
Average life expectancy is 10
Weight = 10
Changing weight to 30
New weight is 30
Changing weight to -30
Weight after assigning negative value is 30
woof!
nom nom!
I love walking with my hooman. And occasional zoomies!
meow!
nom nom!
Hooman, you better not leash me!
Image by author
woof!
nom nom!
I love walking with my hooman. And occasional zoomies!
I might be an Airbender! May be. Just May be.
Growing with the time.

Leave a Comment