class Test{
public Test(){
System.out.println("I am here");
return;// not getting error
}
public static void main(String[] args){
Test test = new Test();
}
}
I am java beginner. My tutor told me that constructor returns an object and showed me the above example. is it really happening because method is not returning any value but the return;is not getting an error.