Capgemini placement question from previous years, Can any one answer?
What is singleton class? Where is it used?
- 3779 दृश्य
- 6 उत्तर
Your Answer
A singleton class is a design pattern that restricts the instantiation of a class to a single instance, ensuring global access to that instance, typically through a private constructor and a public static method. It is commonly used for managing shared resources like database Buckshot Roulette connections, configuration settings, or logging services, helping maintain consistency and control across an application.
-
- 05 नवम्बर
- 0 टिप्पणी
टिप्पणी
मॉक परीक्षण अभ्यास के लिए
capgemini