What is Singalton design pattern?

RAJNISH SINGH
RAJNISH SINGH

Posted On: Jan 06, 2021

 

The Singleton Design Pattern is a Creational pattern. The main objective of the singleton class is to create only one instance of a class and to provide only one global access point to that object. For instance, in Java, the Calendar class uses its own getInstance()method to get the object to be used.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    HCL Android Developer Interview Questions

    What are Activities in Android?

    Android Activity is the subclass of ContextThemeWrapper class. An activity is a single screen with a user interface just like a window or frame of the application....

    HCL Android Developer Interview Questions

    What is the difference between a process and a thread?

    A process is an active program under execution. Processes require more time for context switching as they are heavier. A program becomes a process at execution time. A process can create other process...

    HCL Android Developer Interview Questions

    What are Broadcast receivers in Android?

    A broadcast receiver is an Android component. It allows registering for system or application events. Once an event happens, all receivers are notified by the Android runtime....