📜  保持构造函数私有的效果是什么 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:37.951000             🧑  作者: Mango

代码示例1
By providing a private constructor you prevent class instances from being created in any place other than this very class. There are several use cases for providing such constructor.