Interviews2 answers
why should constructor have the same name as class name?
2 Answers
constructor means it is automatically executed when ever an object is instantiated for that it takes the class name as constructor name.
This is means it is easily identify the method with out object creation.
Rahul PrajapatPosted Jun 10, 2015, 6:35 PM EDT
constructor means it is automatically executed when ever an object is instantiated for that it takes the class name as constructor name.
This is means it is easily identify the method with out object creation.
chaitanya kPosted Feb 9, 2008, 4:25 PM EST

