Access specifiers are used to control visibility of
Answers
Answered by
3
access specifiers are used to control the class ,
three of access specifiers
1. public
2. private
3. protected
three of access specifiers
1. public
2. private
3. protected
Answered by
0
Answer:
Explanation:
PUBLIC, PRIVATE, and PROTECTED visibility is controlled by access specifiers.
What is access specifiers?
In object-oriented languages, access modifiers (or access specifiers) are keywords that control the accessibility of classes, methods, and other members. Access modifiers are a type of programming language syntax that makes it easier to encapsulate components.
The Access specifiers are
- Public Access : Modifiers for Public Access Specifies that public data members and member functions will be visible throughout the whole class in which they are specified. When we wish to utilise a method anywhere in the class or from outside the class, we use the public modifier.
- Protected Access : This is the most significant Access Modifiers which is used for Making a Data or Member Function as he may only be accessible to a Class that derives it but it does not allow a user to access data that is declared as outside the Program.
- Private Access : Methods or variables marked as private Access modifiers cannot be accessed outside of the class, in an inherited class, or in a subclass. Methods declared as private are only visible in the class where they are declared.
So that we can say Access specifiers are used to control visibility of PUBLIC,PRIVATE AND PROTECTED.
Similar questions
Social Sciences,
7 months ago
Chemistry,
7 months ago
Math,
1 year ago
Geography,
1 year ago
Social Sciences,
1 year ago
English,
1 year ago