Computer Science, asked by WhiteMagic, 2 months ago

Explain the various type of access modifiers​

Answers

Answered by Ᏸυէէєɾϝɭყ
6

Answer:

There are four types of access modifiers:

  • Private: Visible to a particular class
  • Public: Visible to the world
  • Protected: Visible to specific package as well as subclass

Answered by ItzBangtansBird
3

Answer:

{\huge{\textbf{\textsf{{\color{navy}{♡ An}}{\purple{sw}}{\pink{er ♡}}}}}}

Java provides four types of access modifiers or visibility specifiers i.e. default, public, private, and protected. The default modifier does not have any keyword associated with it. When a class or method or variable does not have an access specifier associated with it, we assume it is having default access.

Similar questions