Are static methods in Java always resolved at compile time?

java, static-methods

Solution

Yes, it is thoroughly investigated and explained in this thread on Sun's forums: New To Java - No late binding for static methods

Several quotes:

When the compiler compiles that class it decides at compile time which exact method is called for each static method call (that's the big difference to non-static method calls: the exact method to be called is only decided at runtime in those cases).

Calling static methods only ever depends on the compile-time type on which it is called.

Problem

Are static methods in Java always resolved at compile time?

Original source