adplus-dvertising
frame-decoration

Question

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?

a.

Define a constructor in public access with different signature

b.

Directly create the object in the subclass

c.

Directly create the object in main() function

d.

Not possible

Answer: (a).Define a constructor in public access with different signature

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. 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?