Well, I did what I should have done sooner; I searched this forum for hide and override.
I found an thread on this here:
http://www.javaranch.com/ubb/Forum24/HTML/002192.html I think that the best responses came from Jim Yingst and Marcus Green. Here's what Jim had to say:
Manish- well the offical definition of overriding for
Java comes not from Patrick Naughton, but from the Java Language Specification:
If a class declares an instance method, then the declaration of that method is said to override any and all methods with the same signature in the superclasses and superinterfaces of the class that would otherwise be accessible to code in the class.
The key part here is the phrase instance method. Static/class methods are covered in the next section, Hiding.
The JLS is very clear - you can't override a static method; you hide it. However, to answer Vivek's question, from an exam point of view it may be best to assume that when they say "override" they really mean "override or hide". I say this only because RHE, who were heavily involved in creating the exam, do not appear to make a distinction between hiding and overriding. There's an old discussion about this here. For what it's worth though, I don't think anyone's ever mentioned seeing a question that depended on this in the real exam (and if someone had seen such a question, I'm pretty sure we would have heard complaints about it here.) So: for the exam, don't worry about it, and for the real world, stick to the JLS definition. OK?
And here is Marcus's response:
From the exam point of view I have read feedback from large numbers of people who have taken the exam nad nobody has reported such a question so far.
So I am going to ammend my mock exams to take this question option out.
Marcus