Static class can not be created as object rght,how this task was completed by creating object for static class,please some one explain
Static class can not be created as object
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
A.J
13 February 2019, 10:39
Sometimes there is confusion between a static class and a singleton class where only one instance is allowed. The way to separate them is to understand that the static class should not have any internal variables, each method should function independently, like a function library. However, a singleton class may expose internal values as properties and allow the storage and retrieval of these values.
Static class is a class which cannot be instantiated and all its members are static whereas Singleton is the class that only permit creation of single object and then the object is reused.
0