Site hosted by Angelfire.com: Build your free website today!
 

What is a Constructor?

A constructor is a special method that returns an object of the type of class this it is in. It has the same name as its class.

Constructor is used to define an initial state for the object you are instantiating. As constructor is just a special method, constructor can be overloaded. A constructor signature consists of the constructor name and the types of parameters.