answersLogoWhite

0

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

13y ago

What else can I help you with?

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 diff between hubs and switches?

Please see:What_is_the_difference_between_a_hub_and_a_switch


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.


Diff between clocked SR flipflop and SR flipflop?

bokum


What is difference between gaj or yard?

no diff 1 gaj = yard


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.


Difference between conventional programming and object oriented programming?

diff between oops and conventional programming