When should I make my class public?

If you are maintaining or modifying production code -or- developing an API that you intend to export for other programmers to use, then the best answer is “you should never make classes public unless your clear intent is that your clients should be able to access your class and use it in their own client code .

Sizin İçin Seçtik  How do you write a class in C?

Leave a Reply

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