I still feel blurry about the following two concepts: SCJPs experts plz give me some tips from exam's point of view: 1. A static method can/cannot be overriden? what is the difference between overriding and hiding? (I just don't get it from reading JLS). 2. An inner class means a nonstatic inner class/static and nonstatic both? Thanx in Advance.
1) Overriding implies run-time polymorphism. Calls to <CODE>static</CODE> methods are resolved at compile time so there is no real run-time polymorphism. If you write a static method in a subclass with the same signature and return type as one in the superclass, you are hiding the superclass method because the one in the subclass is now resolved at compile time. 2) <CODE>static</CODE> "inner" classes are really nested classes, not inner. Although Sun has not been consistent with the language used.
Tony Alicea Senior Java Web Application Developer, SCPJ2, SCWCD