- public
- default (package) accessibility
Java, Python, Spring MVC, SpringBoot, SQL, MySQL, MariaDB, PostgreSQL and Back-end theory and code examples.
Showing posts with label Java Modifiers Classification. Show all posts
Showing posts with label Java Modifiers Classification. Show all posts
Monday, 8 June 2015
Java Accessibility modifiers for Top-level classes and interfaces
Sunday, 7 June 2015
Java Modifiers
Introduction
Modifiers are Java keywords that give the compiler information about the nature of code, data, classes or interfaces. For example, we have been using visibility modifiers public, private, protected, package etc. to specify the visibility of class members. Beside visibility we have also used the modifiers static and abstract.
Classification
Modifiers are Java keywords that give the compiler information about the nature of code, data, classes or interfaces. For example, we have been using visibility modifiers public, private, protected, package etc. to specify the visibility of class members. Beside visibility we have also used the modifiers static and abstract.
Classification
- For the purpose of clear understanding, modifiers can be categorized as:
- Accessibility modifiers for top-level classes and interfaces.
- Member accessibility/visibility modifiers for classes.
- Member accessibility/visibility modifiers for interfaces.
- Other modifiers for top-level classes.
- Other modifiers for top-level interfaces.
- Other modifiers for interface members.
- Other modifiers for class members.
Subscribe to:
Posts (Atom)