欢迎光临
我们一直在努力

Java Programming Chapter 4——Object characteristics 2: inheritance (1)

Object characteristics 2: inheritance (1)

1. Inheritance reflects an’ is-a’ relationship between classes.

2. Judge whether dog is an animal? -the dog is an animal, which is obviously established. It is obviously not true that a car is an animal. Parent and subclass.
Example: If an animal is a parent, a dog is a subclass.

赞(0)
未经允许不得转载:171主机测评 » Java Programming Chapter 4——Object characteristics 2: inheritance (1)
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址