G.13 Common Interfaces of the Java API
In this section, we overview several common interfaces found in the Java API. The power and flexibility of interfaces is used frequently throughout the Java API. These interfaces are implemented and used in the same manner as the interfaces you create (e.g., interface Payable
in Section G.12.2). The Java API’s interfaces enable you to use your own classes within the frameworks provided by Java, such as comparing objects of your own types and creating tasks that can execute concurrently with other tasks in the same program. Figure G.28 overviews a few commonly used interfaces of the Java API.
Fig. G.28 Common interfaces of the Java API
Interface | Description |
---|---|
Comparable |
Java contains several comparison ... |
Get Android How to Program, 3/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.