Use to define standard Java language modifiers for a Java element. The items that are available in this property editor depend on the type of Java element being modified.
Access Modifiers
Access modifiers determine where a Java class, method, or field can be accessed.
| Element | Description | 
|---|---|
| Default | The Java element is accessible to any class in the same package. | 
| Private | The Java method or field is accessible within the current class. | 
| Protected | The Java method or field is accessible within the current class and subclasses. | 
| Public | The Java element is accessible to any class. | 
Other Modifiers
Other modifiers define how a Java element can be used, or how it interacts with other classes.
| Element | Description | 
|---|---|
| Abstract | An abstract class contains some methods that are not defined and must be implemented in subclasses. An abstract method contains no body and must be overridden in subclasses. | 
| Static | A static method or field is shared by all instances of the current class. | 
| Transient | A transient field is not saved if the object is serialized. | 
| Native | A native method is invoked from a Java application, but written in another "native" language, usually C or C++. | 
| Final | A final class may not be used as a superclass. A final method may not be overridden by a subclass. A final field's value cannot be changed. | 
| Synchronized | A synchronized method will seize control of the class while it is running. This is used in a multithreaded environment to make sure two threads do not access an object at the same time. | 
| Volatile | A volatile field's value can be changed by unsynchronized threads. | 
Related Topics
Developing Applications with NetBeans IDE,
| Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |