李刚 发表于 2013-8-16 14:51:15

[Oracle interview]What is Overriding?

曹凯 发表于 2013-8-16 15:01:46

When aclass defines a method using the same name, return type, and arguments as amethod in its superclass, the method in the class overrides the method in thesuperclass.When the method is invoked for an object of the class, it is thenew definition of the method that is called, and not the method definitionfrom superclass. Methods may be overridden to be more public, not moreprivate.
页: [1]
查看完整版本: [Oracle interview]What is Overriding?