What is the return type of a constructor in java?
As we know that we do not have to add any return type to a Java constructor. class Sample{ ..... Sample(){ ........ } } In Objective C, if we create a constructor, it returns a pointer to its class. But it is not compulsory, I think. AClass *anObject = [[AClass alloc] init];//init is the constructor with return type a pointer to AClass Similarly, Is the constructor converted to a method which return a reference to its own class?? Like this: class Sample{ ..... Sample Sample(){ ........ return this; } } Does the compiler add a return type a reference to same class to constructor? What is