Examveda

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: Option B


This Question Belongs to Java Program >> Miscellaneous In Java

Join The Discussion

Related Questions on Miscellaneous in Java