You can access static members of a given class by its reference, this is kinda bizarre but the compiler just check the reference's type of the variable and switch it for you on the bytecode, for example:
What the compiler do is to check what type "a" is and then switch it for you. All the lower a's becomes upper A's in the bytecode. But be carefull, the compiler does it based on the reference type, not the objec. For instance:
Even your object is of B type, you are accessing the A members!
girl power ... turns out to be about a hundred watts. But they seriuosly don't like being connected to the grid. Tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss