0
Do constructors return a value?
3 Réponses
+ 16
They always return an instance of the class ;)
You can't change this behavior, so constructors don't need a return type.
+ 7
No, they don't. Not even void.
After all, you cannot get anything of value from creation of an object. And void would make it more like a function.
+ 1
ya constructor don't have any return type