O'Reilly logo
  • Michael ss thinks this is interesting:

Access Restrictions in Static Methods

Because a static method is invoked without a class instance, you cannot use a this or super reference in the static method. That is to say, it is illegal to reference any of the class fields or methods using a this reference within a static method. However, a static method can access the class members (both fields and methods). A class member is a member of the class that is declared using the static keyword. As you have seen so far, both fields and methods can be declared with the static ke


Cover of Java Programming