Posted On: Feb 22, 2018
Access modifier in Kotlin provides the developer to customize the declarations as per the requirements. Kotlin provides four modifiers. They are:
Private: This makes the declaration visible only inside the file containing a declaration.
Public: It is by default, which means that the declarations will be visible everywhere.
Internal: This makes the declaration visible everywhere in the same modules.
Protected: This keeps the declaration protected and is not available for top-level declarations.
Never Miss an Articles from us.
Which type of Programming does Kotlin support?..