Chapter 6. Properties
We touched upon properties briefly in Chapter 3, Object Oriented Programming in Kotlin. In this chapter, we will take a detailed look at them. You will learn about
- General properties
- Visibility
- Lazy and late initialized
- Delegated properties
- When to use properties instead of methods
Furthermore, we will see how to use a Kotlin property from Java and we'll take a peek at the bytecode produced to understand what the compiler does. If you are familiar with C#, the information presented here will be familiar, after all the concept of properties was brought in from the .NET world.