Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Ravi PatelRank #439 · 5.7K reputationPosted Dec 9, 2015, 10:39 PM EST
Rajeesh MenothRank #118 · 18.4K reputationPosted Dec 10, 2015, 1:01 AM EST
Private constructor is a special constructor that generally used in class that contains only static members. If class has only private constructors not any public constructor then it is not possible to create instance of the class. Basically private constructor prevents to create instance of the class. If you want to create instance of the class which has private constructor then you need to create a public constructor along with private constructor.
MahaRank #2,573 · 543 reputationPosted Dec 10, 2015, 10:21 AM EST
Daril148 reputationPosted Nov 16, 2021, 2:42 AM EST