What is Singleton pattern?

Talha Mughal
Talha Mughal

Posted On: Dec 17, 2020

 

The singleton pattern is the simplest design pattern that restricts the one instantiation of a class that involves only one object that is responsible to make sure there is no more than one instance. Class instantiates itself and at the same time. It provides a global point of access to that instance and ensures the same instance can be used from everywhere

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Cognizant Mulesoft interview questions

    How to declare function in dataweave?

    You can declare a function in the header or body of a DataWeave script by using the fun keyword. Declaration of a function in data weave is as follows: fun function_Name(objParameter) = { Variable...

    Cognizant Mulesoft interview questions

    What is serialization and deserialization in Java?

    In Java, serialization is a mechanism to persist java objects in a form of a sequence of bytes that includes the object’s data as well as information about the object’s type and its value....

    Cognizant Mulesoft interview questions

    What is a middleware?

    Middleware is software that acts as an intermediary between an operating system and software applications, especially on a network. Middleware is generally used for linking various software applicatio...