MENU

Fun & Interesting

Modules and Services

Java 10,521 lượt xem 7 years ago
Video Not Working? Fix It Now

Alex Buckley, Editor, JLS/JVMS, Oracle

Most Java developers know the saying “Program to an interface, not an implementation.” In JDK 9, the module system introduces “services” to make this concept explicit: modules declare which interfaces they program to, and the module system automatically discovers implementations. This clarifies program structure and helps avoid the need for optional dependencies between modules. Using examples from the JDK, this session shows how to adopt services in your codebase and how to design APIs in a modular fashion.

Comment