Kotlin Classes
Learn about object-oriented programming in Kotlin.
We'll cover the following
The object-oriented programming (OOP) paradigm focuses on the creation of objects that encapsulate data and behavior. It involves the use of classes and objects, which create real-world entities and abstract concepts.
Classes and objects
Kotlin uses the class
keyword followed by the name to declare a class. It uses curly brackets to enclose the body of the class, and uses properties to declare and access class members. A property is a value associated with an object, which we can read or write using some code. For instance, see the code widget below:
Get hands-on with 1400+ tech skills courses.