Whether defining a class, property, method, or function, we sometimes want to limit the visibility of that code. Like in Java, Kotlin has multiple visibility modifiers that control how widely a piece of code can be accessed:
- public
- internal
- protected
- private