I would just like to confirm this. I assume this to be true.
If it is then why would you ever require specifying "super();" in a constructor... as in DashboardPanel? In every case where a class inherits another class (including where no explicit inheritence is specified in the code), by standard java rules, the parent is constructed before the child class, beginning with the top level class - Object - in the inheritence chain. In this process of construction the parent will be constructed using the default constructor ("super():") automatically, if no other constructor is specified.
I just want to confirm, because the text of the book makes a case - provides a reason - for specifying the default constructor in DashboardPanel.
Thanks.
|