Page 1 of 1

What happens if constructor of class A is made private?

Posted: Wed Jul 13, 2022 7:46 pm
by answerhappygod
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