Can static classes have constructors?

A static class can only have static members — you cannot declare instance members (methods, variables, properties, etc.) in a static class. You can have a static constructor in a static class but you cannot have an instance constructor inside a static class.

Sizin İçin Seçtik  What is private constructor in Java example?

Leave a Reply

Your email address will not be published. Required fields are marked *