Free Oracle 1Z0-819 Exam Questions (page: 6)

Which two statements are true about Java modules? (Choose two.)

  1. Modular jars loaded from --module-path are automatic modules.
  2. Any named module can directly access all classes in an automatic module.
  3. Classes found in ­classpath are part of an unnamed module.
  4. Modular jars loaded from ­classpath are automatic modules.
  5. If a package is defined in both the named module and the unnamed module, then the package in the unnamed module is ignored.

Answer(s): A,C


Reference:

http://tutorials.jenkov.com/java/modules.html



Given:



Which two lines of code when inserted in line 1 correctly modifies instance variables? (Choose two.)

  1. setCCount(c) = cCount;
  2. tCount = tCount;
  3. setGCount(g);
  4. cCount = setCCount(c);
  5. aCount = a;

Answer(s): B,E



Given:



What is the expected result of javac?

  1. javac fails to compile the class and prints the error message, C:\workspace4\Mycar.java:1:error:
    package java does not exist
  2. javac compiles Mycar.java without errors or warnings.
  3. javac fails to compile the class and prints the error message, C:\workspace4\Mycar.java:1:error:
    expected import java.lang
  4. javac fails to compile the class and prints the error message, Error: Could not find or load main class Mycar.class

Answer(s): B



Given:



Which is true?

  1. The compilation fails due to an error in line 6.
  2. The compilation succeeds.
  3. The compilation fails due to an error in line 4.
  4. The compilation fails due to an error in line 10.
  5. The compilation fails due to an error in line 7.
  6. The compilation fails due to an error in line 9.
  7. The compilation fails due to an error in line 2.

Answer(s): A



Viewing page 6 of 66



Post your Comments and Discuss Oracle 1Z0-819 exam prep with other Community members:

1Z0-819 Exam Discussions & Posts