📜  什么是 Singleton,你在你的框架中使用什么? - 无论代码示例

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

代码示例1
Singleton: is a design pattern: one instance everywhere. nothing else
The driver class: we use static method to get driver 
so only one instance for all object 
We made the driver class constructor Private, 
so that one instance being used in our framework
One instance being used for all entire framework