How to create a single instance of class
How to make single instance of class and how to use in all the modules
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mageshwaran RPosted Nov 24, 2019, 11:12 AM
Vinay SinghPosted Jun 30, 2016, 7:35 AM
ketan borsdiyaPosted Jun 30, 2016, 7:34 AM
ketan borsdiyaPosted Jun 30, 2016, 7:22 AM
Vinay SinghPosted Jun 30, 2016, 7:11 AM
Vinay SinghPosted Jun 30, 2016, 7:04 AM
Rafnas T PPosted Jun 30, 2016, 7:02 AM
ketan borsdiyaPosted Jun 30, 2016, 7:00 AM
Vinay SinghPosted Jun 30, 2016, 6:56 AM
Static Class:
Singleton:
- You can create one instance of the object and reuse it.
- Singleton instance is created for the first time when the user requested.
- Singleton class can have constructor.
- You can create the object of singleton class and pass it to method.
- Singleton class does not say any restriction of Inheritance.
- We can dispose the objects of a singleton class but not of static class.
For detail check the linkketan borsdiyaPosted Jun 30, 2016, 6:51 AM
Vinay SinghPosted Jun 30, 2016, 6:39 AM