answersLogoWhite

0


Best Answer

A top-level class in Java may be declared with one or more modifiers:

  • Access modifiers: public or package-private (no explicit modifier).
  • Modifier requiring override: abstract
  • Modifier prohibiting value modification: final
  • Modifier forcing strict floating point behavior: strictfp
  • Annotations

Top-level classes cannot be static and not all combinations of modifiers are allowed; e.g. class cannot be declared both abstract and final.

Access level modifiers at the member level-public, private, protected, or package-private (no explicit modifier).

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What modifiers may be used with top-level class?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is class modifiers in java?

Class Modifiers are access modifiers that specify the accessibility levels of a class. There are 4 basic access modifiers in java. They are: 1. Public 2. Protected 3. Default and 4. Private 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 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 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.


What are access specifires 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.


If access modifier and visibility are same?

Yes. 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 class modifiers in java?

Class Modifiers are access modifiers that specify the accessibility levels of a class. There are 4 basic access modifiers in java. They are: 1. Public 2. Protected 3. Default and 4. Private 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 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 the cpt code and modifier for optic nerve decompression?

The CPT code for an optic nerve decompression is 67570. There are numerous modifiers that may be used with this code depending on the situation.


Can you use Jamo GTS White Thin-set Mortar to install porcelain tile?

Yes it may be used with certain porcelain tile made in the USA modifiers can be added for others.


Class D fire extinguishers may be used on all fires.?

False class D which i think is dry powder can only be used on electrical fires.


What is the difference between local class and nested class?

The main difference between a local class and a nested class is, local class can be used for once of a perticular part where as nested class can be used used anywhere through out the program. You may get clear information regarding Interview Questions at http://www.bigvacancies.com/java-interview-questions/


What consists of a frame color and icon and may include text or graphic modifiers that provide additional information?

military symbol


What consists of a frame color and icons and may include text or graphics modifiers that provide additional information?

Military Symbol


What has the author Caroline May Yuk Choi written?

Caroline May Yuk Choi has written: 'Investigation of modifiers of intestinal disease in cystic fibrosis mice'


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.


What is the Plural for hana in Japanese?

Though often times the plural is implied/inferred, or explicitly stated with modifiers, you may say 'hanatachi.'


What is the fullform of class?

The word class is not an abbreviation, its a word. You may see an abbreviation 'class.' using a period to indicate that it's an abbreviation. If it is used with the period, it's short for 'classification'.