+ 3
How to use private constructor ?
I still can't get hold of it, if private constructor cannot be accessed from outside the class, then what is the use of having private constructor !
4 Respostas
+ 8
You use it, if you don't want to be the class instantiated from another class. Search for Singleton pattern on Google. Rarely used.
+ 1
Thanks @Tashi N
0
you can create object inside the same class
- 1
None.