Methods and Constructors are different. Methods return value and constructors won't. There is no connection between methods and constructors. In the above case the method won't stop compiler providing a default no-arg constructor for the class Base.As long as your class doesn't contain any explicitly defined constructors with arg's compiler will automatically provide one default no-arg constructor for your class.
CODE:
class Base{
public void Base(){
System.out.println("Base");
}
//public base(){} This constructor will be provided by compiler since Base doesn't contain any explicitly defined constructors.
}
public class In extends Base{
public static void main(String argv[]){
In i = new In();
//In() {super();} Same here.This constructor will be provided by compiler since In doesn't contain any explicitly defined constructors.
}
}
Finally since both the constructors Base(){} and In(){} doesn't contain anything it will compile just fine but without giving any output.
I hope you may find this helpful.
