posted 15 years ago
Actually, it has nothing to do whether it is static or not.
In your example, you can access x2 because you class extends Pack. The static member x2 in Pack is protected, which means classes extending this one have access to it.
The previous post simply implied that you do not need an instance of Pack to get access to x2, because x2 is a static member. Therefore, you could simply right Pack.x2 to gain access to it.