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.

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.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

The rules of accessibility are governed by the 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.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is rules of accessibility in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Why people generally use oracle as backend of java projects?

there are certain rules to make up a relational data base management system, oracle follows it and so its an rdbms


What are the rules in naming a source file in JAVA program?

The basic rule is that the file name should match the name of the topmost public class in the .java file. The names are usually camel case and can contains alphabets and numbers. It should begin only with an alphabet.


Explain the statement there is more to java than the language?

All programming languages are abstract things - collections of rules which dictate how symbols may form words, how words may form statements, and how statements may form programs. Programming languages need "other stuff" in order to actually be useful. For most languages this will include either a compiler or an interpreter which can turn source code into executable programs. Java's "other stuff" includes a compiler, which turns Java source code into Java byte code, and the Java Virtual Machine (JVM), which allows Java byte code to execute on your computer.


Does Visual Java plus plus and Java Builder is different from the Java language?

Yes!Visual Java plus plus and Java Builder is different from the Java language?


What are the different java technologies?

There are several types of Java technology. Some examples of Java software are Java ME, Java EE, Java SE, and Java Card. Java made the JAVA development kit for those that develop in Java. There is also Java Virtual machine and some class libraries. Java is also famous for its languages like Clojure, Beanshell, Groovy, Gosu, Rhino, Kotlin, JRuby, Scala, and Jython.

Related questions

What is a feature of firewalls?

Rules can be set up on port accessibility


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.


What are Accessibility options?

definition of accessibility options


What is the Tagalog word for accessibility?

The Tagalog word for accessibility is "pagiging accessible" or "pagdadaanan."


Can you use constructor in servlet?

Yes you can but it is not required. A Servlet is nothing but another .java file and all rules that are applicable to standard Java classes are applicable to them. Note: Even if you write a constructor in a servlet, it will not get executed.


What is the default accessibility for members of an interface?

the default accessibility for interface is PUBLIC


How accessibility influences career choices?

how can accessibility influence your career


In switch case programming why are some parameters always in brackets?

There are syntax rules that are to be followed in every programming language and similar is the case here. These rules are a part of the Java language specification.


What is a API in java?

Application Programming Interface. Rules about how a certain software can communicate with other software.check ot the API library.


When was Accessibility without Exclusion created?

Accessibility without Exclusion was created in 2010.


What is tourism Accessibility?

Accessibility in tourism is how easy it is for the tourist to access or get to the desired destination.


When was Foundation for Information Technology Accessibility created?

Foundation for Information Technology Accessibility was created in 2000.