โ† 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. Which tool introduced in Java 9+ creates a custom runtime image containing only the modules your application needs?

    Answer: jlink

    `jlink` assembles a custom runtime image from a set of modules, reducing the deployment footprint.

  2. What is the purpose of the `jdeps` tool?

    Answer: Analyze class and package-level dependencies of a JAR or class file

    `jdeps` analyzes dependencies between packages and modules, helping identify which modules a class or JAR requires.

  3. Which file in a JAR is responsible for specifying the Main-Class and other metadata?

    Answer: META-INF/MANIFEST.MF

    The `MANIFEST.MF` file inside `META-INF/` stores JAR metadata including `Main-Class`, `Class-Path`, and custom attributes.

  4. When compiling with modules, which flag adds a module to the set of root modules without editing module-info.java?

    Answer: --add-modules

    `--add-modules` lets you include additional modules in the module graph without modifying module descriptors.

  5. What is the default access level for a package inside a named module that does NOT use an `exports` directive?

    Answer: The package is inaccessible to all other modules

    In the module system, packages that are not explicitly exported are encapsulated and inaccessible to code in other modules.

  6. Which command creates a `.jmod` file from a set of compiled classes and resources?

    Answer: jmod create --class-path out mymodule.jmod

    `jmod create` packages compiled classes, native libraries, and configuration files into a `.jmod` file used by `jlink`.

  7. What does `--patch-module =` allow you to do at runtime?

    Answer: Inject additional classes into a module without recompiling it

    `--patch-module` overlays classes from a path into a named module, commonly used for testing or hot-patching.