group-icon
Java Developers
Group for Java developers and programmers. Ask questions and get answers related to Java programming
270 Members
Join this group to post and comment.
Archana Priyadarshini
Archana Priyadarshini
Computer Science
04 Feb 2019

When is the constructor invoked? Can a class have multiple constructors?

The constructor of a class is invoked every time an object is created with new keyword.

a class can have multiple constructors with different parameters. Which constructor gets used for object creation depends on the arguments passed while creating the objects.