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
More answers
User Avatar

Wiki User

13y ago

Just googling "java access specifiers" brings up relevant hits. It shouldn't, because there is no such thing. There are access modifiers.

This link:

http://staff.science.uva.nl/~heck/JAVAcourse/ch4/ss2_2.html

(which is wrong because it talks about access specifiers) has a useful table:

Summary of Access Modifiers

The following table summarizes the access level permitted by each modifier. Situation public protected default private Accessible to class

from same package? yes yes yes no Accessible to class

from different package? yes no, unless it is a subclassno no

Note the difference between the default access which is in fact more restricted than the protected access. Without access specifier (the default choice), methods and variables are accessible only within the class that defines them and within classes that are part of the same package. They are not visible to subclasses unless these are in the same package. protected methods and variables are visible to subclasses regardless of which package they are in.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

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.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

They both mean the same.

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.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

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

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

There is no such thing as an access specifier in Java.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

There is no such thing as an access specifier in Java.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the Diff between Access Specifiers and Access Modifiers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering
Related questions

Define access specifiers in object oriented programming?

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 modifiers. 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 modifier and Private is the most restrictive access modifier. NB there is no such thing as an 'access specifier' in Java, only access modifiers.


Diff between 8086 and 8051?

35


What is the difference between MIS and IMS?

MIS (Management Information Systems) refers to the technology and systems used for managing and analyzing information within an organization to support decision-making. IMS (Information Management System) is a type of database management system used for managing and organizing information in mainframe computing environments. In summary, MIS deals with management of information systems while IMS is a specific type of database system.


What is the diff between hubs and switches?

Please see:What_is_the_difference_between_a_hub_and_a_switch


What is the difference between radioisotopes and radionuclide?

diff between radio isotope and radionuclei


Difference between net banking and telebanking?

they are not diff they are same


What is the difference between ncc and scout?

diff between official wife and unofficial wife


What is difference between partial differentation and normal diffrentation?

Ordinary Diff -> One variable Partial Diff -> More than one variable


What is the diff between magic and superstitions?

Magick is a craft. Superstitions are beliefs.


What time diff between ist?

5 hour 30 min


What is the difference between pricing inventory and valuation inventory?

in fact there is no diff.


Diff between clocked SR flipflop and SR flipflop?

bokum