โ† All 1Z0-811 Flashcard Decks

Java Development and Deployment Flashcards

7 cards from real 1Z0-811 practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Java Development and Deployment flashcards as text
  1. In the Java module system, what is an 'automatic module'?

    Answer: A regular JAR placed on the module path that gets a module name derived from its filename

    Placing a non-modular JAR on the module path makes it an automatic module; it reads all other modules and exports all its packages.

  2. What is the 'unnamed module' in the Java module system?

    Answer: The collection of all classes and JARs found on the legacy classpath

    All code on the class path is grouped into a single unnamed module, which reads every named module but cannot be read by named modules.

  3. Which statement about `--add-exports` is correct?

    Answer: It exports a package from one module to another at runtime without modifying module-info.java

    `--add-exports` is a command-line flag that dynamically exports a package from a source module to a target module for the duration of that JVM run.

  4. Which tool is used to interactively explore Java APIs and test code snippets without writing a full program?

    Answer: jshell

    `jshell` is Java's REPL (Read-Eval-Print Loop), introduced in Java 9, for quickly experimenting with code and APIs.

  5. What happens to split packages (the same package spread across multiple modules) in the Java module system?

    Answer: They are not supported; the JVM will throw an error at startup

    The module system prohibits split packages between named modules; the JVM will fail with an error if two modules export the same package.

  6. Which `javac` flag produces verbose output showing every class that is loaded during compilation?

    Answer: -verbose

    `javac -verbose` prints information about each class that the compiler loads and each source file it compiles.

  7. When using `jlink` to create a custom runtime image, which option specifies the modules to include?

    Answer: --add-modules

    `--add-modules` tells `jlink` which root modules to include; it then resolves and adds all transitive dependencies automatically.