This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / in Java, overridding a method,it execute parent method and then the child method body automatically.but I saw some program calling super() in child method,why?I think even you don't call super(),compiler insert super() at the begining of child method.
-richwin();
2004-10-3
{93}
(#1913766@0)
-
No, you are wrongOverriding don't excute the method of the super class.
the super() method will called automaticlly in the constructor at the first, even you don't write the super() explicitly. constructor can't be overrided.
-stevensun2000(小胖子);
2004-10-3
{213}
(#1913837@0)