static
A Java keyword used to define a variable as a class variable. Classes maintain one copy of class variables regardless of how many instances exist of that class.
static can also be used to define a method as a class method. Class methods are invoked by the class instead of a specific instance, and can only operate on class variables.
static field
Another name for class variable.
static method
Another name for class method.
class variable
A data item associated with a particular class as a whole--not with particular instances of the class. Class variables are defined in class definitions. Also called a
static field. See also instance variable.
class method
A method that is invoked without reference to a particular object. Class methods affect the class as a whole, not a particular instance of the class. Also called a
static method. See also instance method.
Partager