Monday, November 28, 2011

Features of Static/Shared classes.

Static classes are used when any change made to an object should not affect the data and functions of the class. They can be used to create data and functions without the need of an instance.

Following are features of Static/Shared classes:-

-They can not be instantiated. By default a object is created on the first method call to that object.
-Static/Shared classes can not be inherited.
-Static/Shared classes can have only static members.
-Static/Shared classes can have only static constructor.

No comments:

Post a Comment