Flashcards

Quick study sessions to strengthen memory and retain key concepts.

Flashcard Study

Java: Java Modules (JPMS)

Front

What role does module-info.java play in enforcing encapsulation?

It specifies which packages are accessible, preventing unauthorized access. The module-info.java file allows you to declare which parts…

View Card →
Flashcard Study

Java: Java Modules (JPMS)

Front

How do automated tests improve project reliability?

Automated tests ensure consistent and frequent validation of code, reducing human error. Automated tests are executed by software…

View Card →
Flashcard Study

Java: Java Modules (JPMS)

Front

How can unauthorized package access be prevented in JPMS?

By not exporting internal packages. Frame the concept in practical terms so you can explain it during interview…

View Card →
Flashcard Study

Java: Java Modules (JPMS)

Front

How would you explain a common mistake when using JPMS in an interview?

Forgetting to declare necessary 'requires' or 'exports'. A common mistake in JPMS is not declaring necessary dependencies with…

View Card →
Flashcard Study

Java: Java Modules (JPMS)

Front

Why use Gradle over Maven?

Gradle offers more flexibility and faster builds. Gradle provides a more flexible build configuration and is often faster…

View Card →
Flashcard Study

Java: Java Modules (JPMS)

Front

What is strong encapsulation in JPMS?

Restricting access to module internals. Frame the concept in practical terms so you can explain it during interview…

View Card →
Flashcard Study

Java: Java Modules (JPMS)

Front

How do 'requires' in module-info.java affect a module?

They specify other modules the module depends on. The 'requires' directive in module-info.java declares which modules are needed…

View Card →
Flashcard Study

Java: Java Modules (JPMS)

Front

What are the trade-offs of using integration tests?

They offer system-wide assurance but are resource-intensive. Integration tests validate the interaction between components in a system, providing…

View Card →
Flashcard Study

Java: Java Modules (JPMS)

Front

Why is mocking important in testing?

It isolates the unit being tested from its dependencies. Mocking replaces parts of your system with controlled implementations.…

View Card →
Flashcard Study

Java: Java Modules (JPMS)

Front

Why use 'exports' in module-info.java?

To specify which packages are accessible outside the module. Using 'exports' in module-info.java, a module can control which…

View Card →