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  What is purpose of abstract class in Java?

Leave a Reply

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