Which is better interface or abstract class 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  Can we call abstract class in Java?

Leave a Reply

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