Java——super的使用
生活随笔
收集整理的這篇文章主要介紹了
Java——super的使用
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
總是忘了,還是記下來吧~~
With super(), the superclass no-argument constructor is called.
With super(parameter list), the superclass constructor with a matching parameter list is called.
如果父類中沒有構造器,那么Java編譯器就會自動插入一個對父類無參數的構造器的調用。
然后,super還可以調用父類的方法:
super.aMethod();
轉載于:https://www.cnblogs.com/bolumiere/p/6564913.html
總結
以上是生活随笔為你收集整理的Java——super的使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: iOS wkwebview https
- 下一篇: 201521123052《Java程序设