欢迎光临
我们一直在努力

Java Programming Chapter 4——The first usage of super(2)

The first usage of super(2)

1. Note: this (argument), this () and super (argument) and super () cannot exist at the same time.

2. If the first sentence in the constructor is this () or this (argument), at runtime, the JVM will give up looking for super () and super (argument) in the current constructor and turn to the constructor pointed by this () or this () to look for super (argument).Execution result:
–A structure–
–B structure–
–B structure with parameters–

赞(0)
未经允许不得转载:171主机测评 » Java Programming Chapter 4——The first usage of super(2)
分享到: 更多 (0)

评论 抢沙发

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