在重写一个类的时候, 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);
- }
- }
来源: http://www.bubuko.com/infodetail-2547625.html