Question 1

Given:

You want to use the myResource class in a try-with-resources statement. Which change will accomplish this?
  • Question 2

    Given:
    Automobile.java

    Car.java

    What must you do so that the code prints 4?
  • Question 3

    Given this enum declaration:

    Examine this code:
    System.out.println(Letter.values()[1]);
    What code should be written at line 5 for this code to print 200?
  • Question 4

    There is a copyServiceAPI that has the org.copyservice. spi. Copy interface To use this service in a module, which module- info.java would be correct?
    A)

    B)

    C)

    D)
  • Question 5

    Given:

    Why does D cause a compilation error?