Kotlin Visibility Modifier
Kotlin
A).Visibility Modifiers Inside Package:-
A).Visibility Modifiers Inside Package:-
- Public:- Visible every where.
- Private:-Visible inside the file containing the declaration.
- Internal:-Visible inside the same package.
- Protected:-Not available inside the package.
B).Visibility inside the classes and interface
- Public:- Visible to any client who can see the declaring the class.
- Private:- Visible inside the class only.
- Protected:- Visible inside the class and its sub classes.
- Internal:- Visible to any client inside the module that can see the declaring class.