0
Why private constructors? What's the use?
4 Réponses
+ 3
Yes, you can a have private constructor. This is a common design pattern practice most often used with a Singleton class. It will then usually be accessed from a public static method.
+ 1
I don't think constructors can be private