KnowledgeBoat Logo
|

Computer Applications

List some of the special properties of the constructor functions.

Java Constructors

9 Likes

Answer

Some of the special properties of the constructor functions are as follows:

  1. It has the same name as that of its class.
  2. It doesn't have any return type, not even void.
  3. It adheres to the rules of access specifiers.
  4. It can be parameterized or non-parameterized.
  5. It is used to create and initialize objects from a class.
  6. It can be overloaded to provide multiple ways of creating objects with different initialisation parameters
  7. It is always called implicitly when an object is created using the new keyword.

Answered By

6 Likes


Related Questions