This example above clearly states that a static method is indeed inherited but not overridden....but still i've found this to be true that many persons fail to recognise this fact that static methods are also inherited
Thanks for your reply and clarification. I never knew that a static is not barred from inheritance ...But the K&B books fails to mention this fact.....
I mean i was not able to extract this info from their SCJP 1.5 book
Still waiting for an opinion....
Can anyone please comment on this ?
Thanks marc for your prompt reply. But i did'nt get your point. How can a static method which is specific to Class Main2 be called upon a reference of it's subclass Main. Does this mean that static methods are indeed inherited ?
Thanks Irina for your reply...
But as far as i know that the static methods are not inherited as they are a part of the class but not a part of the any instance ? So don'nt you think it violates the definition of Static ?
Can anybody please comment on this code...it works fine and displays the output as "In Main2's Static" i do not understand why...
Has this anything to do with inheritance please advise...