Which is better abstract class or interface in Java?

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 . Interfaces are a good choice when we think that the API will not change for a while.

Sizin İçin Seçtik  Borsada renkli çizgiler ne demek?

Leave a Reply

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