The static static
- Modifies a method called == class method == or == static method ==.
- Static methods == cannot access non-static member variables of the class and non-static methods ==.
- Modifies a variable called == static variable == or == class variable ==. The value of a static variable is initialized by the JVM.
- == Static variables are defined outside of a method ==, are global variables in a class, and can be called by all methods in the class.
- == Static variables do not have this keyword. Instance variables only have the this keyword. = =
- Static variables and static methods are created when the class is loaded, exist and die at the same time as the class ==.
- Class properties, class methods, can be accessed by class name and object.
- A piece of code called == static code block ==.
- Instance properties and methods can only be accessed through the object.
Final final
- Modifies a class that cannot be inherited. All member methods ina final class are implicitly designated as final ==
- Modifier that cannot be overridden.
- Modifiable variable 1: == modifies a basic data type whose value cannot be modified. == 2: == modifies a reference type, indicating that it cannot point to another object after being initialized. = =