When a method declaration includes a
staticmodifier, that method is said to be a static method. When no
staticmodifier is present, the method is said to be an instance method.
A static method does not operate on a specific instance, and it is a compile-time error to refer to
thisin a static method.
An instance method operates on a given instance of a class, and that instance can be accessed as
When a method is referenced in a member-access of the form
Mis a static method,
Emust denote a type containing
M, and if
Mis an instance method,
Emust denote an instance of a type containing