Constructor is a method used to initialize the state of an object, and it gets invoked at the time of object creation.
Rules for constructor are:
Constructor Name should be same as class name.
Constructor must have no return type.
Rules for constructor are:
Constructor Name should be same as class name.
Constructor must have no return type.
No comments:
Post a Comment