Campbell Ritchie wrote:What default constructor? The Bootchy class doesn't have a default constructor. java.lang.Object might have, but there is no default constructor here. Line 5 is not a default constructor, but a no-arguments constructor with an implemented body. The two are very different.
Yes Campbell, as usual you are technically correct (according to section 8.8.9 of
Java Specification). But both you and me, and quite a lot of other people also knows that the term “default constructor” may additionally refer to a constructor that may be called without arguments.
Outside of the academic world, it is easier to tell a programmer "you need to create a default constructor" instead of saying "you need to create a no-argument constructor".
So, from a beginners point of view, how would you explain the difference between:
that is a default constructor per definition and
that is not?