Skip to content
EntityQ333324· pop 12· linked from 38 articles

方法重写

Sign in to save

Also known as override

language feature in object-oriented programming

In the Vinony graph

Within Vinony's link graph, 方法重写 is referenced by 38 other articles, and connects out to inheritance, polymorphism and method.

It is catalogued under the topic Method (computer programming).

Its subject is documented across 11 Wikipedia language editions.

Wikidata facts

Image
Method overriding in subclass.svg
Show 2 more facts
Sources (1)

via Wikidata · CC0

Article · 中文

在面向对象的编程中,方法覆写是一种语言功能,它允许子类或子类提供已由其超类或父类之一提供的方法的特定实现。 它允许特定类型的多态性(子类型)。 子类中的实现通过提供与父类中的方法具有相同名称、相同参数或签名以及相同返回类型的方法来覆盖(替换)超类中的实现。执行的方法的版本将由用于调用它的对象确定。 如果使用父类的对象调用方法,则执行父类中的版本,如果使用子类的对象调用方法,则执行子类中的版本。 某些语言允许程序员防止方法被覆盖。

Abstract from DBpedia / Wikipedia · CC BY-SA

Connections

Categories