StaticClass與Non-StaticClass差異

Difference between static and non-static class

STATIC CLASS:

Static class is defined using static keyword.
In static class, you are not allowed to create objects.
The data members of static class can be directly accessed by its class name.
Static class always contains static members.
Static class does not contain an instance constructor.
Static class cannot inherit from another class.

NON-STATIC CLASS:

Non-Static class is not defined by using static keyword.
In non-static class, you are allowed to create objects using new keyword.
The data members of non-static class is not directly accessed by its class name.
Non-static class may contain both static and non-static methods.
Non-static class contains an instance constructor.
Non-static class can be inherited from another class.