Singleton class need to have only one instance per JVM at any given time.
In Static class we can directly access the methods/variables without creating a instance of it.
Then why singleton is...
Type: Posts; User: tcstcs
Singleton class need to have only one instance per JVM at any given time.
In Static class we can directly access the methods/variables without creating a instance of it.
Then why singleton is...
When we have Static class, what is the need for Singleton design pattern. I tried googling, but didn't get satisfactory answer.
Please tell me if anybody knows the exact diff