Which is better to use abstract class or interface in Java?

Abstract classes should primarily be used for objects that are closely related. Interfaces are better at providing common functionality for unrelated classes.

Sizin İçin Seçtik  Why do we use abstract class in C?

Leave a Reply

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