更新时间:2023-09-25 07:51:03
继承:狗
'是'动物
。在Java中,这是通过 extends
关键字完成的。
Inheritance: Dog
'is an' Animal
. In Java this is done by the extends
keyword.
作文:狗
'有'眼睛
。在Java中,这是通过让Dog成为Eye的实例对象来完成的。
Composition: Dog
'has' Eyes
. In Java this is done by having Dog an instance object of Eye.