private / protected
Last updated
What is private / protected?
The private and protected keywords are used to control the visibility of members (variables and methods) in classes, objects, or packages. If no access modifier is specified, the default access level is public.
Free resources to learn private / protected
More in stage 13: Scope & Visibility
private / protected: common questions
Can I learn private / protected 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 private / protected 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 private / protected tutorial for beginners?
It is lesson 70 of 165 in the free Scala roadmap, in stage 13, Scope & Visibility. If you are new to Scala, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.