Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What is true about private constructor?

a) Private constructor ensures only one instance of a class exist at any point of time
b) Private constructor ensures multiple instances of a class exist at any point of time
c) Private constructor eases the instantiation of a class
d) Private constructor allows creating objects in other classes

Answer: a
Explanation: Object of private constructor can only be created within class. Private constructor is used in singleton pattern.

Join The Discussion