Visibility Modifiers
Last updated
What is Visibility Modifiers?
Visibility modifiers control the accessibility of classes, objects, interfaces, constructors, properties, and functions in Kotlin. They determine from where these declarations can be accessed. Kotlin provides four visibility modifiers: private, protected, internal, and public. Each modifier restricts access to different scopes, allowing you to encapsulate your code and control how it's used.
Free resources to learn Visibility Modifiers
- Official docsVisibility modifiers
- ArticleVisibility modifiers
- VideoKotlin Newbie to Pro - VISIBILITY MODIFIERS
More in stage 26: Visibility Modifiers
Visibility Modifiers: common questions
Can I learn Visibility Modifiers in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Visibility Modifiers in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this Visibility Modifiers tutorial for beginners?
It is lesson 77 of 153 in the free Kotlin roadmap, in stage 26, Visibility Modifiers. If you are new to Kotlin, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.