+ 7

Why do Private Constructors exist?

Just recently, I learned that a constructor can be private. My question is; what's d point?

17th Sep 2017, 6:24 PM
David Akhihiero
David Akhihiero - avatar
3 Answers
+ 11
Search for Singleton pattern.
17th Sep 2017, 6:29 PM
Tashi N
Tashi N - avatar
+ 8
Thanks all 😊
17th Sep 2017, 6:48 PM
David Akhihiero
David Akhihiero - avatar