September 2011
Beginner
650 pages
15h 47m
English
Like methods, constructors can also be overloaded. Doing so allows you to construct objects in a variety of ways. For example, consider the following program:


MyClass( ) is overloaded four ways, each constructing an object differently. The proper constructor is called based upon the parameters specified when new is executed. By overloading a class’ constructor, you give the user of your class flexibility in the way objects are constructed.
One of the most common reasons that constructors are overloaded is to allow one ...
Read now
Unlock full access