Amit Kumar
Why Constructor have not return type
By Amit Kumar in C# on Jan 27 2011
  • kanchan setia
    Feb, 2011 3

    constructor is a special method in java. the purpose of the constructor is to assign values to the instance variable when the object is created for the first time. the name of the constructor is same as the class name. to call the constructor in two ways.with new operator eg: Test t1=new Test(); here Test() is nothing but to call the construtor of class.with newInstanceOf() method in Class class eg: object obj=class.newInstance();

    • 0
  • knights
    Jan, 2011 31

    This is alright to ask on forums such as this.I would be more intrested in getting to know that exact questions like the one you posted; have you tried to Copy and Paste it on Google.com ?

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS