How do static methods interact with inheritance?
Ans : Static (per-class, rather than per-object) methods do not participate in overriding (choosing the right method at runtime based on the class of the object). Probably the best and simplest way to think about this (and to write your code) is to write every invocation of a static method using the fully qualified class name: class A { public static method1() { A.method2(); } public static method2() { } } class B extends A { public static method3() { A.method1(); } public static method2() { } } Now it is perfectly clear that the static method2() that is called is A.method2(), not B.method2(). A.method2() will be called regardless of whether you use the fully-qualified class name or not, but using “A.” makes it obvious to all.