java裏的this和super

在重寫一個類的時候,this()裏面傳參數代表調用構造函數。this.什麼代表調用屬性或者方法。super()還有super.都是父類的實現。
public class MysimpleDateFormat extends SimpleDateFormat {

public MysimpleDateFormat() {

    this("yyyy-MM-dd   hh:mm:ss");
}

public MysimpleDateFormat(String arg0) {
    super(arg0);

}

public MysimpleDateFormat(String arg0, Locale arg1) {
    super(arg0, arg1);

}

public MysimpleDateFormat(String arg0, DateFormatSymbols arg1) {
    super(arg0, arg1);

}

}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章