Jan 21, 2009

In C++ and Java, if a derived class does not explicitly invoke a constructor of the base class (in C++ in the initialize list, in Java using super() i

In C++ and Java, if a derived class does not explicitly invoke a constructor of the base class (in C++ in the initialize list, in Java using super() in the first line), then the default constructor is implicitly invoked for the base class. If the base class does not have a default constructor, it is an error.

No comments:

Post a Comment