vendredi 24 août 2018

When should I write interface and abstract class [duplicate]

This question already has an answer here:

When we write a programme using java, we can start writing an interface, abstract class, and next to a concrete class. But without writing interface and abstract class, we can just write the concrete class with all implementations. When should I write an interface, an abstract class with a concrete class?. Because I always write interface and abstract class just as a practice and follow the oop concept. Please explain to me.

Aucun commentaire:

Enregistrer un commentaire