Code Against Interfaces, Not Implementations
An old and true rule of thumb useful for every piece of code is to “separate your code into interface and implementation and then let other parts of the system rely just on the interfaces.” This advice is much older than Java, but it’s so true that it’s valuable to investigate its implications for writing Java APIs. This chapter provides an overview from various angles.
KeywordsVirtual Machine Java Class Final Class Abstract Classis Return Type
Unable to display preview. Download preview PDF.