Constructor
is like a method which may contains some set of statement, but constructor does
not have any return type and it will have the same name as the class name.
A
Constructor is called automatically when the object of class is being called.
Basically Constructor is used to initialize the data member of a class.
Eg:
Public class newClass1
{
Public newClass1()
{
}
}
No comments:
Post a Comment