What Happens If Constructor Of Class A Is Made Private #234
What happens if constructor of class A is made private?
This multiple choice question (MCQ) is related to the book/course gs gs128 Java. It can also be found in gs gs128 Java Classes Methods - Java Access Control - Quiz No.1.
What happens if constructor of class A is made private?
Any class can instantiate objects of class A
Objects of class A can be instantiated only within the class where it is declared
Inherited class can instantiate objects of class A
classes within the same package as class A can instantiate objects of class A