KnowledgeBoat Logo
|

Computer Applications

What is a constructor ? What does it do ?

Java Constructors

14 Likes

Answer

A constructor is a member function with the same name as that of its class but no return type.

A constructor is used to initialize the objects of that class type with legal initial values.

Answered By

9 Likes


Related Questions