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  Is abstract Better Than interface?

Leave a Reply

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