Google News
logo
Java Constructor - Interview Questions
Why return type is not allowed for the constructor?
The return type is not allowed in the constructor because if we provide a return type in the constructor, it will act as the normal method. So, to differentiate between constructor and method block, the return type is not allowed in constructors.
Advertisement