| Type: |
|
| Level: |
Intermediate
|
| Date: |
2006-Dec-08
|
| Visited: |
2259 times
|
| Rating: |

|
| Author: |
Alex Plumpton |
|
|
It is possible to define more than one constructor function in a class. This is known as constructor overloading. The class definition shown in the figure declares three constructors for an integer object.
The first constructor receives no arguments, the seconds receives two integer arguments and the third receives one integer object as argument. The declaration shown in the figure, automatically invokes the first constructor.