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 happens if constructor of class A is made private?

a) Any class can instantiate objects of class A
b) Objects of class A can be instantiated only within the class where it is declared
c) Inherited class can instantiate objects of class A
d) classes within the same package as class A can instantiate objects of class A

Answer: b
Explanation: If we make any class constructor private, we cannot create the instance of that class from outside the class.

Join The Discussion