Object-oriented programming (OOP) is a very famous and widely used programming methodology. The Java programming language enables OOP with programming concepts such as classes, interfaces, abstraction, inheritance, polymorphism, encapsulation, and many more. The following sections will explain these concepts in Kotlin.
Object-oriented programming with Kotlin
Learning about visibility modifiers
Visibility modifiers can be specified to classes, interfaces, constructors, functions, and properties. In Kotlin, the following visibility modifiers are available:
Visibility modifiers | Classes | Interfaces | Constructors | Functions | Properties |
private |
Visible only inside the file |
Visible only inside the file |
Visible only inside the... |