I didn't dig deep into this, but it's probably because of a compiler optimization: the variables S in class V and I in class X are compile-time constants, so in your main() method the compiler replaces "V.S" and "X.I" by the values of the constants - and so classes X and V don't need to be loaded anymore.
I think that's what Tony was hinting in another post. That bothers me though. What if a third party changes the value of V.S and I plug in a new jar but don't recompile? I'll miss the change?
Ernest Friedman-Hill
,
author and iconoclast
staff