Monday, January 17, 2011

Constructor Overloading

Constructor Overloading
Overloading of constructor is same as overloading of method. Constructor overloading is having two or more constructor within a same class with different parameters.
We can achieve overloading by
  • Number of Parameters
  • Types of Parameters
  • Arrangement of Parameters


Example
Number of Parameters


Types of Parameters


Arrangement of Parameters


No comments:

Post a Comment