it appear that this program should just print woof but it print woof woof.
why it prints woof 2 times.
Joined: Aug 16, 2007
It prints two time 'woof' because it calls two times bark method of class Dog. Remember one thing that you can't override the static methods because they are related to class and not specific to object. What do you say?
Joined: Jan 29, 2009
now i got it. it means static methods or data variables can't be overriden.
thansk once again.