Possible Duplicate:
Overriding vs Hiding Java - Confused
Can someone please explain method hididng in Java with an example and why we use method hiding?
I read the tutorial of Oracle but couldn't understand.
Possible Duplicate:
Overriding vs Hiding Java - Confused
Can someone please explain method hididng in Java with an example and why we use method hiding?
I read the tutorial of Oracle but couldn't understand.
When you have static method in the super class and if you create a method with same signature in the sub class, the super class method will get called if you are using the super class reference and sub class method gets called if you are using the sub class reference.