• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

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: 41506
881
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