answersLogoWhite

0


Best Answer

An Access Modifier is a key word in java that determines what level of access or visibility a particular java variable/method or class has. There are 4 basic access modifiers in java. They are:

1. Public

2. Protected

3. Default and

4. Private

Private is the most restrictive access modifier whereas public is the least restrictive. Default is the access protection you get when you do not specifically mention an access modifier to be used for a java object.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Discuss the different level of access protection in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are different types of access modifiers?

An Access Modifier is a key word in java that determines what level of access or visibility a particular java variable/method or class has. There are 4 basic access modifiers in java. They are: 1. Public 2. Protected 3. Default and 4. Private Private is the most restrictive access modifier whereas public is the least restrictive. Default is the access protection you get when you do not specifically mention an access modifier to be used for a java object. Java programming does not run by just a single piece of class that has the whole functionality. You have hundreds of classes that interact with one another, passing data between them and returning output to the user of the system. So it is very important for members of one class to access members of another. Here members may refer to variables, methods and even classes. So, this is where the access modifiers come into picture. The modifier associated with every member of the class determines what level of visibility that member has.


What is acess spacifier in java?

An Access Modifier is a key word in java that determines what level of access or visibility a particular java variable/method or class has. There are 4 basic access modifiers in java. They are: 1. Public 2. Protected 3. Default and 4. Private Private is the most restrictive access modifier whereas public is the least restrictive. Default is the access protection you get when you do not specifically mention an access modifier to be used for a java object.


Discuss about the visibility control of java program?

Visibility is another term used for Acess Specifiers for java variables and objects.One of the techniques in object-oriented programming is encapsulation. It concerns the hiding of data in a class and making them available only through its methods. In this way the chance of making accidental mistakes in changing values is minimized. Java allows you to control access to classes, methods, and fields via so-called access specifiers. The access to classes, constructors, methods and fields are regulated using access modifiers i.e. a class can control what information or data can be accessible by other classes. To take advantage of encapsulation, you should minimize access whenever possible.Java provides a number of access modifiers to help you set the level of access you want for classes as well as the fields, methods and constructors in your classes. A member has package or default accessibility when no accessibility modifier is specified.Access Modifiers1. Private2. Protected3. Default4. PublicPublic is the most liberal access specifier and Private is the most restrictive access specifier.


What is the Diff between Access Specifiers and Access Modifiers?

An Access Modifier is a key word in java that determines what level of access or visibility a particular java variable/method or class has. There are 4 basic access modifiers in java. They are: 1. Public 2. Protected 3. Default and 4. Private Private is the most restrictive access modifier whereas public is the least restrictive. Default is the access protection you get when you do not specifically mention an access modifier to be used for a java object.


What is rules of accessibility in java?

An Access Modifier is a key word in java that determines what level of access or visibility a particular java variable/method or class has. There are 4 basic access modifiers in java. They are: 1. Public 2. Protected 3. Default and 4. Private Private is the most restrictive access modifier whereas public is the least restrictive. Default is the access protection you get when you do not specifically mention an access modifier to be used for a java object. Java programming does not run by just a single piece of class that has the whole functionality. You have hundreds of classes that interact with one another, passing data between them and returning output to the user of the system. So it is very important for members of one class to access members of another. Here members may refer to variables, methods and even classes. So, this is where the access modifiers come into picture. The modifier associated with every member of the class determines what level of visibility that member has.

Related questions

What is an access matrix in an operating system?

Is a matrix that shows the protection level accross several domains.


Explain the access mechanism of a magnetic disk how is this access mechanism different in RAID level5?

Explain the access mechanism of a Magnetic disk. How is this access mechanism different in RAID level 5?


Explain how sentences and clauses work at the most basic level Discuss how clauses make up sentences and how different sentences can help you communicate?

Explain how sentences and clauses work at the most basic level. Discuss how clauses make up sentences and how different sentences can help you communicate Explain how sentences and clauses work at the most basic level. Discuss how clauses make up sentences and how different sentences can help you communicate


Explain different access modifier in java?

An Access Modifier is a key word in java that determines what level of access or visibility a particular java variable/method or class has. There are 4 basic access modifiers in java. They are: 1. Public 2. Protected 3. Default and 4. Private Private is the most restrictive access modifier whereas public is the least restrictive. Default is the access protection you get when you do not specifically mention an access modifier to be used for a java object.


Why there is need to give different access to different user?

In a project, one gives different levels of access to different users because not every member needs the same level of access. In some cases, in fact, having access to more information than one needs can confuse and complicate matters.


What things should one look for when comparing different types of security software?

One should determine what level of security one wants, and what kind of protection is needed to attain this protection. Types of protection include anti-viral software which include automatic and manual disk scanning for viruses and malware and their removal, firewalls, and parental blocks which prevent access to targeted website.


Write a Program to demonstrate accessibility of different access specifiers in java?

An Access Modifier is a key word in java that determines what level of access or visibility a particular java variable/method or class has. There are 4 basic access modifiers in java. They are: 1. Public 2. Protected 3. Default and 4. Private Private is the most restrictive access modifier whereas public is the least restrictive. Default is the access protection you get when you do not specifically mention an access modifier to be used for a java object.


Each level of strategy involves different strategic decisions. discuss taking into consideration the different levels of strategy illustrate your answer with the help of examples?

Give the answer of the above question.


What is the ideal cholestorol level for a person?

There are many different types of cholesterol that are tested for, both good and bad. A normal level can vary depending on the person, you should discuss the matter with your doctor.


What is the access code for the last level on B-Cubed?

The level 11 access code is 575900.


Information required in different levels of management in organization?

Strategic management level Tactical management level Operational management level Consider information required by different departments at different levels as above i.e human resource department, financial department, marketing department, production/operations department


Why are trained protection dogs so popular?

To get a personal protection dog you have to go on a course to become a dog handler then you can get the level of dog your trained to handle ,here is the different levels of personal protection dogs (level 1) basic abediance show aggresion on comand and attack without bitting (level 2) the same as level 1 except its trained to bite (level 3)the same a 1 and 2 except its trained in more real life situations for eg someone with a weapon,(level 4) this is the highest you can get these dogs are usually refered to as (executive protection dogs )