Home / Questions / Where and how can you use a private constructor?
Explanatory Question

Where and how can you use a private constructor?

👁 596 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

Private constructor is used if you do not want other classes to instantiate the object and to prevent subclassing.