How i can define a Constructor
1073
22-Aug-2017
Niraj Kumar Mishra
22-Aug-2017when you want to define a constructor in your Program then you follow these rules.
• A constructor must have the same name as the class name.
• A constructor does not return anything, not even a void type.
• A constructor may take zero or more arguments.
• By default, the compiler provides a no-argument constructor.
• If you provide any constructor in your program then compiler does not provide a default constructor.