Saturday 1 September 2012

Java Constuctor


  • The constructor in Java have same name as name of class in which they belong.
  • The constructor in java does not have any return type, science never return anything.
  • The main use of constructor is to initialize the value of the reference variable to instance variable. 
  • Java provide a default constructor which takes no arguments and performs no special actions or initializations,when no explicit constructor are provided.