Sign In
Sign-Up
Welcome!
Close
Would you like to make this site your homepage? It's fast and easy...
Yes, Please make this my home page!
No Thanks
Don't show this to me again.
Close
Class Field Modifiers
Access Modifiers:
public: Fields with the public modifier are accessable from all classes.
protected: Fields with the protected modifier are accessable from classes in the same package and subclasses.
private: Fields with the private modifier are accessable only from the class in which they are declared.
no modifier: Fields without a modifier are accessable from the same package.
State Modifiers:
transient: Field doesn't get saved or loaded when using object serialization.
volatile: Field data consistency is maintained in multi-threaded environments.
static: Field is accessed by using the class name, not by using an instance of the class. One value shared by the class.
final: Field is a constant; once the value is initialized it can't be re-assigned anywhere at any time.