In this article: http://www.ibm.com/developerworks/java/library/j-jtp1029/index.html
Brian Goetz states: “Just because class X is compiled against final class Y doesn’t mean that the same version of class Y will be loaded at run time.”
Could someone please explain this in more detail? If class Y is final, it can’t be subclassed, so what’s the meaning of this statement?
Suppose you load a class X with a classloader that has a different implementation of class Y. In that case, X would be linked with the different Y.
Note that the statement says “the same version of class Y”, which means Y could simply be changed after X was compiled.