Lets consider there is a Class containing Parameterised contructor not the user defined Default constructor. Now on instantiating the class will the default constructor be called ?
No, if you call an overloaded constuctor, only the constructor with the correct arguments will be called. You could call the default constructor from the overload constructor if you wanted to:
public class MyClass{
public MyClass(){
}
public MyClass(Object obj){
this();
}
}
Or vice versa:
public class MyClass{
public MyClass(){
this(Systm.now());
}
public MyClass(Object obj){
}
}
Thanks,
Matt