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);

}

}

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