2
Reply

Difference between singleton vs static?

Sudheer Kumar

Sudheer Kumar

11y
2.5k
0
Reply

    Singleton class--- only one time we need to create the object and access throughout globally static class---not possible to create the object

    1. Singleton objectstores in Heap but, static objectstores in stack
    2. We can clone the object of Singletonbut, we can not clone the static class object
    3. Singleton classfollow the OOP(objectoriented principles) but not static class
    4. we can implement interface with Singleton class butnot with Static class.