双11狂欢大促

盲盒赢 定制羽绒服

开启惊喜盲盒,抽取你的专属好礼

— 惊喜奖品抢先看 —

英文水平很差,有几个词实现搞不定了,如能指点一二,不胜感激

搬运工木木 搬运工木木 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
本人英文水平很差(初中水平都不到),所以看英文资料实在很辛苦,这段文字最后一小节的含义实在不是很明白,试着译了一下,不知道是否正确

Let's say we
have a class hierarchy with ClassTwo subclassed off ClassOne, and ClassThree subclassed off ClassTwo


All three classes have instance variables that must be initialized and the initialization code looks like the
following.

ClassOne::initialize() {
... set some variables ...
}

ClassTwo::initialize (){
super::initialize
... set some variables ...
}

ClassThree::initialize() {

super initialize.
... set some variables ...
}



When we create an instance of ClassThree and execute the ClassTwo initialize code from the ClassThree object, what does super refer to? If it refers to the superclass of the class executing the code, then super will be ClassTwo and the initialize message will be again sent to ClassTwo. Ie, we'll end up in an infinite loop. On the other hand, if super refers to the superclass of the class defining the code, the message will be sent to ClassOne and everything works fine.

译:当我们建立一个ClassThree 的实列,并且从这个实例对象中运行 ClassTwo initialize 代码,super引用了什么?如果他引用了父类(SuperClass)的执行代码(?executing the code,这个实在不太明白什么意思),super 将替换成? ClassTwo 并且 initialize 消息 将再次传递给 ClassTwo.ie(什么意思?那么的意思),我们将进入一个无尽的循环中(死循环?).
另一方面,如果super 引用了父类的定义代码(?definning the code),消息将会被传送给ClassOne,所有工作都变得很好了.

这段话我猜的大致意思是 指如果super 引用了 父类的 executing the code,那么ClassTwo 里的initialize里的Super也变成引用 ClassTwo了?如果是引用了父类的 Defining the code 那么 ClassTwo 里的initialize里的Super也变成引用 ClassOne了?
对于 executing the code,Defining the code 不是很理解,如能指点一二,不胜感激
...全文

相关推荐

SCJP中文版,数码相机拍的。310-055考试参考用书,对于英文水平不太高的,很适用。(1) SCJP中文版(1)(1)(3) SCJP中文版,数码相机拍的。310-055考试参考用书,对于英文水平不太高的,很适用。(1)(3) SCJP中文版(1) scjp考试专门用书,专门针对310-055。(2) SCJP中文版(1)(4) scjp考试专门用书,专门针对310-055。(2)(3)

310-055考试参考用书,对于英文水平不太高的,很适用。(1) SCJP中文版(1)(1)(3) SCJP中文版,数码相机拍的。310-055考试参考用书,对于英文水平

qijisong

SCJP中文版,数码相机拍的。310-055考试参考用书,对于英文水平不太高的,很适用。(1)(3) scjp考试专门用书,专门针对310-055。(2) SCJP中文版(1) SCJP中文版(1)(1)(3) SCJP中文版(1)(4) SCJP中文版,数码相机拍的。310-055考试参考用书,对于英文水平不太高的,很适用。(1) scjp考试专门用书,专门针对310-055。(2)(3)SCJP中文版,数码相机拍的。310-055考试参考用书,对于英文水平不太高的,很适用。(1)(3) sc

310-055考试参考用书,对于英文水平不太高的,很适用。(1)(3) scjp考试专门用书,专门针对310-055。(2) SCJP中文版(1) SCJP中文版(1)(

qijisong

如何提高初中生作文水平.doc

总之,提高初中生作文水平需要教师的悉心指导和学生自身的积极参与。

bw6236223

利用多媒体提高民族地区学生作文水平.doc

【正文】《利用多媒体提高民族地区学生作文水平》的研究报告主要探讨了在21世纪信息社会背景下,如何通过现代教育技术,尤其是多媒体技术,来提升民族地区学生的作文水平,培养他们的创新能力和实践能力。

xfy16588

2021-2022收藏资料怎样提高作文水平.doc黄琦.doc

同时,借鉴优秀作品,学习其结构、语言和情感表达,也是提升作文水平的有效途径。最后,实践是提高作文水平的最好方式。

weixin_42838205
评论 4
收藏 已收藏
分享
返回顶部
搬运工木木
Java SE 62,621 成员 307,251 内容