【发布时间】:2014-09-07 15:50:26
【问题描述】:
我正在查看本教程: http://www.developerfeed.com/building-todo-list-app-android-using-sqlite
我不明白的是这段代码:
public Task()
{
this.taskName=null;
this.status=0;
}
public Task(String taskName, int status) {
super();
this.taskName = taskName;
this.status = status;
}
为什么需要在这一点上调用 super() ?
编辑:我问的原因是因为我个人认为没有必要把它放在那里。
【问题讨论】:
-
你明白
super();是做什么的吗? -
我了解 super() 的作用。这就是我问的原因,因为对我来说这似乎没有必要。但我可能会遗漏一些东西。