When you create a new instance (a new object) of a class using the new keyword, a constructor for that class is called. Constructors are used to initialize the instance variables (fields) of an object. Constructors are similar to methods, but with some important differences.
Posted on: July 1, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles