10/20/2023 0 Comments Java interface vs abstract classes![]() Wise programmers often share this pearl of wisdom: Prefer composition over inheritance. But not of state, where most of the trouble comes from Composition over inheritanceĪn alternative to using an abstract class for shared behavior is creating a separate class for specific behavior, then adding an object of that separate class to be kept as a member field on the larger class. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |