主页
论坛
新帖
最新消息
新帖
最新动态
制作互助群
登录
注册
Toggle sidebar
Toggle sidebar
菜单
安装应用
安装
回复主题
【进站必读】宝可饭堂社区全局规定v1.10
关于坚决维护同人创作社群秩序与共识的公告
论坛
独立开发
进阶教程
【TA】【ESS】07 类的多态性
禁用JavaScript。为了获得更好的体验,请在运行之前启用浏览器中的JavaScript。
您正在使用一款已经过时的浏览器!部分功能不能正常使用。
请尝试升级或使用
其他浏览器
。
信息
<blockquote data-quote="TAAAAAAA" data-source="post: 2360" data-attributes="member: 2783"><p><u>The ‘super’ keyword “超级”关键词</u></p><p></p><p>When you use <strong>super</strong> in a method, it will look at the superclasses of the current class for a method with the same name as the one it’s called it, and call that:</p><p></p><p>当你想要部分的扩展一个已经存在在父类中的方法,而不是用子类中的同名方法完全覆盖父类中的方法的时候,你就可以使用super(超级,或者说父类)关键词。</p><p>你可能会奇怪为什么是super,这其实是因为父类的英文是Superclass。</p><p>我们来看下面的这个例子:</p><p></p><p></p><p>If none of the superclasses have a method by that name, it will raise an error.</p><p></p><p>如果所有的父类中都不存在同名方法,那么使用super就会报错,请看下面的这个例子:</p><p></p><p></p><p>You can also give arguments to <strong>super</strong>.</p><p></p><p>super也可以传递参数,我们来看下面的这个例子:</p><p></p><p></p><p>本章完。</p></blockquote><p></p>
[QUOTE="TAAAAAAA, post: 2360, member: 2783"] [U]The ‘super’ keyword “超级”关键词[/U] When you use [B]super[/B] in a method, it will look at the superclasses of the current class for a method with the same name as the one it’s called it, and call that: 当你想要部分的扩展一个已经存在在父类中的方法,而不是用子类中的同名方法完全覆盖父类中的方法的时候,你就可以使用super(超级,或者说父类)关键词。 你可能会奇怪为什么是super,这其实是因为父类的英文是Superclass。 我们来看下面的这个例子: If none of the superclasses have a method by that name, it will raise an error. 如果所有的父类中都不存在同名方法,那么使用super就会报错,请看下面的这个例子: You can also give arguments to [B]super[/B]. super也可以传递参数,我们来看下面的这个例子: 本章完。 [/QUOTE]
验证
阿尔宙斯这只宝可梦在全国图鉴中的编号是?(3位纯数字)
回复帖子
最新帖子
○ ESS19-20
【游戏引擎】构造/地震引擎简介
最新更新:TAAAAAAA
今天 18:29
入门教程
ESS
【同人游戏】口袋妖怪 地震 0.4.9
最新更新:TAAAAAAA
昨天 14:25
独立同人
✓ ESS20-21
如何制作一个隐藏性格,并令其无法在野生宝可梦身上出现?
最新更新:TAAAAAAA
昨天 14:24
开发问题
教程攻略
应该是这样
最新更新:幽冥魔帝
2026/07/07
同人改版讨论
mGBA西班牙火箭队五周目汉化版怎么调出内置修改器啊
最新更新:TAAAAAAA
2026/07/06
同人改版讨论
论坛统计
主题
611
消息
2,722
成员
3,849
最新成员
Contrary
联系我们
QQ
2201858342
邮箱
pokefans@qq.com
论坛
独立开发
进阶教程
【TA】【ESS】07 类的多态性
顶部