|Synopsis:||Prevent instantiation of a class if it contains only |
If a class only contains static members there is no use to instantiate it. The way to prevent instantation is to mark the class as
Note that a static class can't be inherited from because there is no use for it (children are only accessible via class names not via instances). So if you have a class with only static methods and it has children, then it is recommended to make a utility class instead.