Monday, December 21, 2009

Constructor in java

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.

No comments:

Post a Comment

Chitika