Skip to content

Singleton is a creational design pattern that lets you ensure that a class has only one instance, while providing a global access point to this instance.

License

Notifications You must be signed in to change notification settings

ParsaMehdipour/Intro-To-Singleton-Design-Pattern

Repository files navigation

Intro-To-Singleton-Design-Pattern

Singleton is a creational design pattern that lets you ensure that a class has only one instance, while providing a global access point to this instance.

  1. The Singleton class declares the static method getInstance that returns the same instance of its own class. The Singleton’s constructor should be hidden from the client code. Calling the getInstance method should be the only way of getting the Singleton object.

About

Singleton is a creational design pattern that lets you ensure that a class has only one instance, while providing a global access point to this instance.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages