英文水平很差,有几个词实现搞不定了,如能指点一二,不胜感激
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考试参考用书,对于英文水平
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)(
如何提高初中生作文水平.doc
总之,提高初中生作文水平需要教师的悉心指导和学生自身的积极参与。
利用多媒体提高民族地区学生作文水平.doc
【正文】《利用多媒体提高民族地区学生作文水平》的研究报告主要探讨了在21世纪信息社会背景下,如何通过现代教育技术,尤其是多媒体技术,来提升民族地区学生的作文水平,培养他们的创新能力和实践能力。
2021-2022收藏资料怎样提高作文水平.doc黄琦.doc
同时,借鉴优秀作品,学习其结构、语言和情感表达,也是提升作文水平的有效途径。最后,实践是提高作文水平的最好方式。


Java SE
