JLS is correct you can have empty "return" keyword in the constructor but you cannot assign any value to that return. On the other hand if you add return type in the constructor signature, that will turn into a method with the same name as class. (another strange act of
JAVA)see the following example.
example:
class Aclass
{
Aclass()
{System.out.println("I am in Constructor");
return;
}
int Aclass()
{
System.out.println("I am in method");
return 4;
}
public static void main( String argv[] ){
Aclass a = new Aclass();
a.Aclass();
}
}
Output : I am in Constructor
I am in method