rahul S Sharma wrote:The default return type of a constructor is the object of the same class. You cannot make a constructor explicitly return any other data type.
That's not really true. Constructors do not return anything, and constructors don't have a return type.
A constructor is a special block of code that is called to initialize a new object. The constructor is not what creates the object - it just initializes the object, the
new operator is what actually creates the object and calls the constructor to initialize it.
The thing that makes this confusing is that it is possible to have regular methods that have the same name as the class. Such a method can easily be mistaken to be a constructor.