If A Class Have Default Constructor Defined In Private Access #239
If a class have default constructor defined in private access, and one parameter constructor in protected mode, how will it be possible to create instance of object?
This multiple choice question (MCQ) is related to the book/course gs gs111 OOP Object Oriented Programming Java. It can also be found in gs gs111 OOps Access Specifiers - OOPs MCQ: Protected Access Specifier - Quiz No.2.
If a class have default constructor defined in private access, and one parameter constructor in protected mode, how will it be possible to create instance of object?
Define a constructor in public access with different signature
Directly create the object in the subclass
Directly create the object in main() function
Not possible