• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Sybex 816 - Adding service provider

 
Greenhorn
Posts: 6
2
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In "Adding a Service Provider" section last paragraph states: "Java allows only one service provider for a service provider interface in a module. If you wanted to offer another tour, you would need to create a separate module".

Why?

Per JLS (https://docs.oracle.com/javase/specs/jls/se11/html/jls-7.html#jls-7.7):



So provides can contain multiple comma-separated service providers after with.
 
author & internet detective
Posts: 42056
926
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Because I didn't know you could do that . I added it to the errata.

Luckily, you won't have to deal with multiple service providers in the same module on the exam.
reply
    Bookmark Topic Watch Topic
  • New Topic