Which of the below classes will use a default constructor, when we initialize an object from them?
class X {}
class Y {
Y () {}
}
class Z {
Z(int i ) {}
}
class Z will not use a default constructor. class X will use a default constructor.
But what about Y? is a user defined empty constructor called a default constructor? Like they say on wikipedia (Java section) http://en.wikipedia.org/wiki/Default_constructor
Or should there be no constructor defined in the class when we can speak of a default constructor when initializing an object?