The Singleton design pattern ensures that only one instance of a class is created, it provides a global point of access to the object and allow multiple instances in the future without affecting a singleton class's clients. To ensure that only one instance of a class is created we make SingletonPattern as static. getInstance() method returns a single instance of the class. We create a private default constructor to avoid outside modification.