Should I use abstract or interface?

If the functionality we are creating will be useful across a wide range of disparate objects, use an interface . Abstract classes should be used primarily for objects that are closely related, whereas interfaces are best suited for providing a common functionality to unrelated classes.

Sizin İçin Seçtik  Is Coursera completely free?

Leave a Reply

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