Both are functions, i.e., places where you can write code. A constructor is simply a special method that is invoked automatically when an object is created.
yes,because in constructor overloading constructor have same and different parameter list. In method overloading method have same name and different parameter list.
Default Constructor will be called first . If you override Validate method , then validate method will be called .
No.
No args means no arguments. Just like any regular method, a constructor can have zero or more arguments.No args means no arguments. Just like any regular method, a constructor can have zero or more arguments.No args means no arguments. Just like any regular method, a constructor can have zero or more arguments.No args means no arguments. Just like any regular method, a constructor can have zero or more arguments.
A constructor is just a special form of a method. You can overload constructors in the exact same way as you can overload any other method.
A constructor is a method that is invoked when an object is created. As to being mandatory, that really depends on the programming language; in the case of Java, each class must have a constructor, however, in many cases Java will automatically provide a default constructor, so you don't really need to program it.
There is no comparison between methods and constructors. They are both present for a reason and each has its own purpose.
A constructor is a method that fires when the object is instantiated. A friend function is a function that has special access to the object. They are two different types of things, and cannot be further differenced.
euklhtl3uiruneuo;
An implicit constructor call will always call the default constructor, whereas explicit constructor calls allow to chose the best constructor and passing of arguments into the constructor.
True
Constructor is not an alternative to class. In Java, you create classes; the classes contain methods - including the constructor, which can be viewed as a special method. If you want to have a constructor, you need a class that surrounds it, so it's not one or the other.