February 2014
Beginner
1248 pages
62h 25m
English
A static method cannot access a class’s instance variables and instance methods, because a static method can be called even when no objects of the class have been instantiated. For the same reason, the this reference cannot be used in a static method. The this reference must refer to a specific object of the class, and when a static method is called, there might not be any objects of its class in memory.
Common Programming Error 8.5
A compilation error occurs if a static method calls an instance method in the same class by using only the method name. Similarly, a compilation ...
Read now
Unlock full access