Don't constructors require any return types? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Don't constructors require any return types?

4th Jan 2017, 8:18 AM
박경록
박경록 - avatar
2 Answers
+ 2
constructors are not actually methods. most of times they are used to initialize . they are called as soon as the class object is created.
4th Jan 2017, 8:48 AM
Siddhesh Bhande
Siddhesh Bhande - avatar
0
No constructors don't require any return type. They are called when the object is created. Well it initialise the object. So therr won't be any return types for constructors.!
20th Feb 2017, 1:10 PM
Arun Fiddler
Arun Fiddler - avatar