Question 16

Given:

and

Which two method definitions at line n1 in the Bar class compile? (Choose two.)
  • Question 17

    Given the code fragment:

    What is the output?
  • Question 18

    Given:

    What is the result?
  • Question 19

    Which module-info.java is correct for a service provider for a print service defined in the PrintServiceAPI module?
  • Question 20

    A company has an existing Java app that includes two Java 8 jar files, sales-3.10. jar and clients-10.2.jar.
    The jar file ,sales -8, 10, jar reference packages in clients -10.2 jar, but clients-10.2 jar does not reference packages in sales -8.10, jar.
    They have decided to modularize clients-10.2.jar.
    Which module-info. Java file would work for the new library version clients-10.3 jar?
    A)

    B)

    C)

    D)