mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-06-16 18:10:13 +08:00
Merge pull request #23 from zeason/patch-1
Update final、static、this、super.md
This commit is contained in:
commit
ad95c39f78
@ -69,7 +69,7 @@ public class Sub extends Super {
|
||||
|
||||
**使用 this 和 super 要注意的问题:**
|
||||
|
||||
- super 调用父类中的其他构造方法时,调用时要放在构造方法的首行!this 调用奔雷中的其他构造方法时,也要放在首行。
|
||||
- super 调用父类中的其他构造方法时,调用时要放在构造方法的首行!this 调用本类中的其他构造方法时,也要放在首行。
|
||||
- this、super不能用在static方法中。
|
||||
|
||||
**简单解释一下:**
|
||||
|
Loading…
x
Reference in New Issue
Block a user