Generally in Programming methods can be accessed through objects of
class.
Constructor is the normal method that is invokes automatically when we create an object. The main reason for having the constructor is to initialize the variables.
In java Constructor providing memory for referenced variables (non static variables).
Constructor name and class name must be same.
If we are not create any constructor compiler will adds default zero argument constructor to your java file.
We can put only return keyword in Constructor.
TCCI Coaching Institute provides various computer courses to school, College students and any persons in Bopal and Satellite in Ahmedabad.
For more information about Courses at TCCI
Call us @ 9825618292
Visit us @ www.tccicomputercoaching.com
Constructor is the normal method that is invokes automatically when we create an object. The main reason for having the constructor is to initialize the variables.
In java Constructor providing memory for referenced variables (non static variables).
Constructor name and class name must be same.
If we are not create any constructor compiler will adds default zero argument constructor to your java file.
We can put only return keyword in Constructor.
TCCI Coaching Institute provides various computer courses to school, College students and any persons in Bopal and Satellite in Ahmedabad.
For more information about Courses at TCCI
Call us @ 9825618292
Visit us @ www.tccicomputercoaching.com
No comments:
Post a Comment